diff options
author | Martin Odersky <odersky@gmail.com> | 2003-09-17 19:45:12 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2003-09-17 19:45:12 +0000 |
commit | 5b9b5356411cbd5e4de94d6c84832f99cd10b5de (patch) | |
tree | fd59c9c23d4aeba05718b2603eb16944b8526d90 /test/pos | |
parent | d8af1f7d532494c988767ca905592c65250293f0 (diff) | |
download | scala-5b9b5356411cbd5e4de94d6c84832f99cd10b5de.tar.gz scala-5b9b5356411cbd5e4de94d6c84832f99cd10b5de.tar.bz2 scala-5b9b5356411cbd5e4de94d6c84832f99cd10b5de.zip |
*** empty log message ***
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); +} + + + |