summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-01-07 22:45:39 -0800
committerPaul Phillips <paulp@improving.org>2012-01-07 23:07:42 -0800
commit1684baefd23a806dbbec7e8f536ac3d624702886 (patch)
tree4e14011ce6e04c59c98ab59f175faddc8b0cd60f
parent04af2eb976bf5b3aec9577837ca03db327d09825 (diff)
downloadscala-1684baefd23a806dbbec7e8f536ac3d624702886.tar.gz
scala-1684baefd23a806dbbec7e8f536ac3d624702886.tar.bz2
scala-1684baefd23a806dbbec7e8f536ac3d624702886.zip
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.
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala5
1 files changed, 3 insertions, 2 deletions
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