From f3707992ee2ed56ce754df8c0760fc3928f0317f Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 31 Mar 2017 11:15:51 +0200 Subject: 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? --- compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/src/dotty/tools/dotc/core/classfile') 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) -- cgit v1.2.3