diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-01-16 14:30:38 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-01-16 14:43:25 +0100 |
commit | 11329c34ad16e9fcdf2f2607f5a7bf39649e93a8 (patch) | |
tree | a542d571754c011e264d14be5b655a51fd8d0750 /test/files | |
parent | 493197fce6c9c493dfa4dcdd8fd5e29bad82d49b (diff) | |
download | scala-11329c34ad16e9fcdf2f2607f5a7bf39649e93a8.tar.gz scala-11329c34ad16e9fcdf2f2607f5a7bf39649e93a8.tar.bz2 scala-11329c34ad16e9fcdf2f2607f5a7bf39649e93a8.zip |
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.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t6443-by-name.check | 3 | ||||
-rw-r--r-- | test/files/run/t6443-by-name.scala | 18 | ||||
-rw-r--r-- | test/files/run/t6443-varargs.check | 1 | ||||
-rw-r--r-- | test/files/run/t6443-varargs.scala | 16 |
4 files changed, 38 insertions, 0 deletions
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: _*) + } +} |