From 5b9b5356411cbd5e4de94d6c84832f99cd10b5de Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 17 Sep 2003 19:45:12 +0000 Subject: *** empty log message *** --- test/pos/bug137.scala | 4 ++++ test/pos/starargs.scala | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 test/pos/bug137.scala create mode 100644 test/pos/starargs.scala (limited to 'test/pos') 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); +} + + + -- cgit v1.2.3