Skip to content

Commit e4a643b

Browse files
committed
More tests for repeated
1 parent 33b3dad commit e4a643b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/pos/repeatedArgs.scala

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
object testRepeated {
2-
def foo = java.lang.System.out.format("%4$2s %3$2s %2$2s %1$2s", "a", "b", "c", "d")
2+
def foo = java.lang.System.out.format("%4$2s %3$2s %2$2s %1$2s", "a", "b", "c", "d")
3+
4+
def bar(xs: Int*): Int = xs.length
5+
def bat(xs: scala.Seq[Int]): Int = xs.length
6+
7+
def test(xs: List[Int]): Unit = {
8+
bar(1, 2, 3)
9+
bar(xs: _*)
10+
11+
val List(_, ys: _*) = xs
12+
bar(ys: _*)
13+
bat(ys)
14+
}
315
}

0 commit comments

Comments
 (0)