diff options
author | Martin Odersky <odersky@gmail.com> | 2009-11-24 15:50:06 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-11-24 15:50:06 +0000 |
commit | 4a1b22e19fcca892917868beb355daef27dc7b8f (patch) | |
tree | a089be4378af8d48fd1a4d2e6ae1e11b75666bff /test | |
parent | d6b43c4b48dceb4ba6682c4a17dae02a0bc7f138 (diff) | |
download | scala-4a1b22e19fcca892917868beb355daef27dc7b8f.tar.gz scala-4a1b22e19fcca892917868beb355daef27dc7b8f.tar.bz2 scala-4a1b22e19fcca892917868beb355daef27dc7b8f.zip |
Closed #2629 #2639 #2669
Diffstat (limited to 'test')
-rwxr-xr-x | test/files/pos/t1545.scala (renamed from test/pending/neg/t1545.scala) | 0 | ||||
-rw-r--r-- | test/files/pos/t2669.scala | 28 |
2 files changed, 28 insertions, 0 deletions
diff --git a/test/pending/neg/t1545.scala b/test/files/pos/t1545.scala index d7c0245725..d7c0245725 100755 --- a/test/pending/neg/t1545.scala +++ b/test/files/pos/t1545.scala diff --git a/test/files/pos/t2669.scala b/test/files/pos/t2669.scala new file mode 100644 index 0000000000..72e931178c --- /dev/null +++ b/test/files/pos/t2669.scala @@ -0,0 +1,28 @@ +// #2629, #2639, #2669 +object Test2669 { + + def test[T](l: java.util.ArrayList[_ <: T]) = 1 + test(new java.util.ArrayList[String]()) + +} + +import java.util.ArrayList + +object Test2629 { + def main(args: Array[String]): Unit = { + val l = new ArrayList[String](1) + val m = new ArrayList(l) + + println(l.size) + println(m.size) + } +} + + +import java.util.Vector + +// scalac cannot detect lack of type params, but then throws AssertionError later: +class TVector2639 { + val b = new Vector // this line passed without error detected + val a = new Vector(1) // this line caused throwing AssertionError when scalac +} |