Permalink
Browse files

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.
  • Loading branch information...
1 parent 04af2eb commit 1684baefd23a806dbbec7e8f536ac3d624702886 @paulp paulp committed Jan 8, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
View
5 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

1 comment on commit 1684bae

@ijuma

Nice.

Please sign in to comment.