diff options
author | Paul Phillips <paulp@improving.org> | 2011-07-18 21:05:23 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-07-18 21:05:23 +0000 |
commit | 44b9cf0ca9606f531218deefe7792b4476552291 (patch) | |
tree | 651f2e377985f29aa74748dcbd4b2bd26da71fd3 /test/files | |
parent | 658ba1b4e6898df65119f9cb6488ed8908c399ef (diff) | |
download | scala-44b9cf0ca9606f531218deefe7792b4476552291.tar.gz scala-44b9cf0ca9606f531218deefe7792b4476552291.tar.bz2 scala-44b9cf0ca9606f531218deefe7792b4476552291.zip |
Modified erasure so we have enough information ...
Modified erasure so we have enough information to determine whether we
need to use scala or java erasure semantics. This fixes the runtime
failure illustrated here:
% scala29 -e 'java.util.Collections.max(null)'
java.lang.NoSuchMethodError: java.util.Collections.max(Ljava/util/Collection;)Ljava/lang/Comparable;
Review by odersky.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/java-erasure.check | 1 | ||||
-rw-r--r-- | test/files/run/java-erasure.scala | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/java-erasure.check b/test/files/run/java-erasure.check new file mode 100644 index 0000000000..f2ad6c76f0 --- /dev/null +++ b/test/files/run/java-erasure.check @@ -0,0 +1 @@ +c diff --git a/test/files/run/java-erasure.scala b/test/files/run/java-erasure.scala new file mode 100644 index 0000000000..c9f9b0ad51 --- /dev/null +++ b/test/files/run/java-erasure.scala @@ -0,0 +1,10 @@ +object Test { + val list = new java.util.ArrayList[String] { }; + list add "a" + list add "c" + list add "b" + + def main(args: Array[String]): Unit = { + println(java.util.Collections.max(list)) + } +} |