aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i536.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-05-07 11:32:35 +0200
committerMartin Odersky <odersky@gmail.com>2015-05-07 11:33:08 +0200
commit8f020bb6632d5d68e169f8caa7d9cbc1bc819d35 (patch)
treed849c43777a99fb6826057c207267b202daba228 /tests/pos/i536.scala
parenta52ca600f2ad427276d1cdabd56133ffd0ed7610 (diff)
downloaddotty-8f020bb6632d5d68e169f8caa7d9cbc1bc819d35.tar.gz
dotty-8f020bb6632d5d68e169f8caa7d9cbc1bc819d35.tar.bz2
dotty-8f020bb6632d5d68e169f8caa7d9cbc1bc819d35.zip
Fix #536 - only load member classes of classes that are currently compiled.
It seems wasteful to load the member classes even of classes that are not currently compiled. It also makes us vulnerable to any misinterpretation of Java file formats. In th particular case of #536, we parsed a class an anonymous Collection$1 which was referring to the type parameter of its enclosing class, but was not diagnosed as an inner class of the enclosing class.
Diffstat (limited to 'tests/pos/i536.scala')
-rw-r--r--tests/pos/i536.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/pos/i536.scala b/tests/pos/i536.scala
new file mode 100644
index 000000000..db9fb9b38
--- /dev/null
+++ b/tests/pos/i536.scala
@@ -0,0 +1,3 @@
+object Max {
+ java.util.Collections.max(null)
+}