diff options
Diffstat (limited to 'test/pos')
-rw-r--r-- | test/pos/bug137.scala | 4 | ||||
-rw-r--r-- | test/pos/starargs.scala | 17 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/pos/bug137.scala b/test/pos/bug137.scala new file mode 100644 index 0000000000..79eb6e67f8 --- /dev/null +++ b/test/pos/bug137.scala @@ -0,0 +1,4 @@ +class A { + type Two[A] = Tuple2[A, A]; + type TwoInt = Two[Int]; +} diff --git a/test/pos/starargs.scala b/test/pos/starargs.scala new file mode 100644 index 0000000000..40b9124637 --- /dev/null +++ b/test/pos/starargs.scala @@ -0,0 +1,17 @@ +case class C[a](x: a*) { + def elems: Seq[a] = x; +} + +object Test with Executable { + def foo(x: int*) = { + C(x: _*); + } + System.out.println(foo(1, 2, 3).elems); + System.out.println(foo(List(1, 2, 3): _*).elems); + System.out.println(new C(1, 2, 3).elems); + val xs = List(1, 2, 3); + System.out.println(new C(xs: _*).elems); +} + + + |