aboutsummaryrefslogtreecommitdiff
path: root/tests/pickling/varargs.scala
blob: 616456616784b596814ad4ce7469ceef58c8c5eb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
object varargs {
  List(1, 2, 3)
  def g(x: Int*) = x.length
  g(1, 2, 3, 4)
  val x = if (true) 1 else 2
  def foo[T](x: T, y: T): T = x
  foo(1, 2)
  val xs = 1 :: 2 :: Nil
  g(xs: _*)
  g(Nil: _*)
  g(1)
  g()
}