From 1684baefd23a806dbbec7e8f536ac3d624702886 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sat, 7 Jan 2012 22:45:39 -0800 Subject: Don't hard fail over missing classfiles. There's no need to blow up when a classfile references other classes which aren't present. We can struggle onward and maybe it'll turn out they had no intention of trying to get at the class that isn't there. I have all kinds of confidence scala will find a way to fail when the time comes. Closes SI-5343. --- src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala index de11f3aa28..a158012f9f 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -439,9 +439,10 @@ abstract class ClassfileParser { /** Return the class symbol of the given name. */ def classNameToSymbol(name: Name): Symbol = { - def loadClassSymbol(name: Name) = { + def loadClassSymbol(name: Name): Symbol = { val file = global.classPath findSourceFile ("" +name) getOrElse { - MissingRequirementError.notFound("class " + name) + warning("Class " + name + " not found - continuing with a stub.") + return NoSymbol.newClass(name.toTypeName) } val completer = new global.loaders.ClassfileLoader(file) var owner: Symbol = definitions.RootClass -- cgit v1.2.3