Browse files

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.
  • Loading branch information...
1 parent 493197f commit 11329c34ad16e9fcdf2f2607f5a7bf39649e93a8 @retronym retronym committed Jan 16, 2013
View
3 test/files/run/t6443-by-name.check
@@ -0,0 +1,3 @@
+1
+foo
+foo
View
18 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
+ }
+}
View
1 test/files/run/t6443-varargs.check
@@ -0,0 +1 @@
+foo
View
16 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: _*)
+ }
+}

0 comments on commit 11329c3

Please sign in to comment.