aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/classfile
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-31 11:15:51 +0200
committerMartin Odersky <odersky@gmail.com>2017-03-31 11:15:51 +0200
commitf3707992ee2ed56ce754df8c0760fc3928f0317f (patch)
treea9d433e5e1ff9f6fec03254fed796660abb52b85 /compiler/src/dotty/tools/dotc/core/classfile
parent03f13046f0a6cde36cba2a9649aad8996ba7550a (diff)
downloaddotty-f3707992ee2ed56ce754df8c0760fc3928f0317f.tar.gz
dotty-f3707992ee2ed56ce754df8c0760fc3928f0317f.tar.bz2
dotty-f3707992ee2ed56ce754df8c0760fc3928f0317f.zip
Fix ClassfileParser
#2158 has uncovered flaws in the classfile parser. Matches that used to always miss led to code that made no sense. The function naming was terrible too, that's why nobody understood what was going on. `findSourceFile` to find the class file, seriously?
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/classfile')
-rw-r--r--compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
index bc140c26b..e0b233ce8 100644
--- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
+++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
@@ -661,7 +661,7 @@ class ClassfileParser(
for (entry <- innerClasses.values) {
// create a new class member for immediate inner classes
if (entry.outerName == currentClassName) {
- val file = ctx.platform.classPath.findSourceFile(entry.externalName.toString) getOrElse {
+ val file = ctx.platform.classPath.findBinaryFile(entry.externalName.toString) getOrElse {
throw new AssertionError(entry.externalName)
}
enterClassAndModule(entry, file, entry.jflags)