Skip to content

Commit 7a8bc79

Browse files
committed
Add test for by-name varargs
1 parent f0fc5c1 commit 7a8bc79

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/pos/byNameVarargs.scala

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package test
2+
3+
object O {
4+
5+
def byname(xs: => Int*) = xs.sum
6+
def byval(xs: Int*) = xs.sum
7+
8+
def a = 1
9+
def b = 2
10+
11+
byval(a, b)
12+
byname(a, b)
13+
14+
}
15+

0 commit comments

Comments
 (0)