summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2009-10-21 17:06:26 +0000
committerMartin Odersky <odersky@gmail.com>2009-10-21 17:06:26 +0000
commit07a9de6b12c25473060268664911de3d116ab043 (patch)
tree4883b5548082c168cec19157d62a94c6ddfca841 /src/compiler
parent6bb3d2ceca8706180bb715f3c390cbcb891f5536 (diff)
downloadscala-07a9de6b12c25473060268664911de3d116ab043.tar.gz
scala-07a9de6b12c25473060268664911de3d116ab043.tar.bz2
scala-07a9de6b12c25473060268664911de3d116ab043.zip
Fixed #2429.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Types.scala2
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala8
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
3 files changed, 9 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala
index 1765536d8d..9bd9c3ccfb 100644
--- a/src/compiler/scala/tools/nsc/symtab/Types.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Types.scala
@@ -531,7 +531,7 @@ trait Types {
// val startTime = if (util.Statistics.enabled) System.nanoTime() else 0l
val result =
((this eq that) ||
- (if (explainSwitch) explain("<", isSubType, this, that)
+ (if (explainSwitch) explain("<:", isSubType, this, that)
else isSubType(this, that, AnyDepth)))
// if (util.Statistics.enabled) {
// subtypeNanos += System.nanoTime() - startTime
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
index 1eef2bf49d..2612e62f3e 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
@@ -1025,7 +1025,13 @@ abstract class ClassfileParser {
if (entry.outerName.endsWith("$")) entry.outerName.subName(0, entry.outerName.length - 1)
else entry.outerName
val sym = classSymbol(outerName)
- val s = atPhase(currentRun.typerPhase)(getMember(sym, innerName.toTypeName))
+ val s =
+ // if loading during initialization of `definitions' typerPhase is not yet set.
+ // in that case we simply load the mmeber at the current phase
+ if (currentRun.typerPhase != null)
+ atPhase(currentRun.typerPhase)(getMember(sym, innerName.toTypeName))
+ else
+ getMember(sym, innerName.toTypeName)
assert(s ne NoSymbol, sym + "." + innerName + " linkedModule: " + sym.linkedModuleOfClass + sym.linkedModuleOfClass.info.members)
s
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index d8fdaa9298..f6ceb7024a 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -801,7 +801,7 @@ trait Typers { self: Analyzer =>
case result: Tree => result
case ex: TypeError =>
if (settings.debug.value) log("fallback on implicits: "+tree)
- val tree1 = typed(original, mode, WildcardType)
+ val tree1 = typed(resetAttrs(original), mode, WildcardType)
tree1.tpe = addAnnotations(tree1, tree1.tpe)
if (tree1.isEmpty) tree1 else adapt(tree1, mode, pt, EmptyTree)
}