From 11329c34ad16e9fcdf2f2607f5a7bf39649e93a8 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Wed, 16 Jan 2013 14:30:38 +0100 Subject: SI-6443 Expand test coverage with varargs, by-name. These were already working, due to a serendipitous ordering of transformations. The tests will keep it this way. --- test/files/run/t6443-by-name.check | 3 +++ test/files/run/t6443-by-name.scala | 18 ++++++++++++++++++ test/files/run/t6443-varargs.check | 1 + test/files/run/t6443-varargs.scala | 16 ++++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 test/files/run/t6443-by-name.check create mode 100644 test/files/run/t6443-by-name.scala create mode 100644 test/files/run/t6443-varargs.check create mode 100644 test/files/run/t6443-varargs.scala diff --git a/test/files/run/t6443-by-name.check b/test/files/run/t6443-by-name.check new file mode 100644 index 0000000000..6f98fa4a28 --- /dev/null +++ b/test/files/run/t6443-by-name.check @@ -0,0 +1,3 @@ +1 +foo +foo diff --git a/test/files/run/t6443-by-name.scala b/test/files/run/t6443-by-name.scala new file mode 100644 index 0000000000..bfd9bf9791 --- /dev/null +++ b/test/files/run/t6443-by-name.scala @@ -0,0 +1,18 @@ +object Test { + + def main(args: Array[String]) { + def foo = {println("foo"); 0} + lazyDep(X)(foo) + } + + trait T { + type U + } + object X extends T { type U = Int } + + def lazyDep(t: T)(u: => t.U) { + println("1") + u + u + } +} diff --git a/test/files/run/t6443-varargs.check b/test/files/run/t6443-varargs.check new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/test/files/run/t6443-varargs.check @@ -0,0 +1 @@ +foo diff --git a/test/files/run/t6443-varargs.scala b/test/files/run/t6443-varargs.scala new file mode 100644 index 0000000000..9cbae3e99c --- /dev/null +++ b/test/files/run/t6443-varargs.scala @@ -0,0 +1,16 @@ +object Test { + + def main(args: Array[String]) { + def foo = {println("foo"); 0} + lazyDep(X)(foo) + } + + trait T { + type U + } + object X extends T { type U = Int } + + def lazyDep(t: T)(us: t.U*) { + List(us: _*) + } +} -- cgit v1.2.3