Skip to content

Commit 11329c3

Browse files
committed
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.
1 parent 493197f commit 11329c3

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

test/files/run/t6443-by-name.check

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
1
2+
foo
3+
foo

test/files/run/t6443-by-name.scala

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
object Test {
2+
3+
def main(args: Array[String]) {
4+
def foo = {println("foo"); 0}
5+
lazyDep(X)(foo)
6+
}
7+
8+
trait T {
9+
type U
10+
}
11+
object X extends T { type U = Int }
12+
13+
def lazyDep(t: T)(u: => t.U) {
14+
println("1")
15+
u
16+
u
17+
}
18+
}

test/files/run/t6443-varargs.check

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
foo

test/files/run/t6443-varargs.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
object Test {
2+
3+
def main(args: Array[String]) {
4+
def foo = {println("foo"); 0}
5+
lazyDep(X)(foo)
6+
}
7+
8+
trait T {
9+
type U
10+
}
11+
object X extends T { type U = Int }
12+
13+
def lazyDep(t: T)(us: t.U*) {
14+
List(us: _*)
15+
}
16+
}

0 commit comments

Comments
 (0)