summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/symtab/Types.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/Types.scala')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Types.scala18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala
index 47ede4228e..6b3d24ffa2 100644
--- a/src/compiler/scala/tools/nsc/symtab/Types.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Types.scala
@@ -3247,6 +3247,9 @@ A type's typeSymbol should never be inspected directly.
}
}
+ class MissingAliasException extends Exception
+ val missingAliasException = new MissingAliasException
+
object adaptToNewRunMap extends TypeMap {
private def adaptToNewRun(pre: Type, sym: Symbol): Symbol = {
if (sym.isModuleClass && !phase.flatClasses) {
@@ -3256,7 +3259,9 @@ A type's typeSymbol should never be inspected directly.
} else {
var rebind0 = pre.findMember(sym.name, BRIDGE, 0, true)(NoSymbol)
if (rebind0 == NoSymbol) {
- assert(false, ""+pre+"."+sym+" does no longer exist, phase = "+phase) }
+ if (sym.isAliasType) throw missingAliasException
+ assert(false, pre+"."+sym+" does no longer exist, phase = "+phase)
+ }
/** The two symbols have the same fully qualified name */
def corresponds(sym1: Symbol, sym2: Symbol): Boolean =
sym1.name == sym2.name && (sym1.isPackageClass || corresponds(sym1.owner, sym2.owner))
@@ -3294,9 +3299,14 @@ A type's typeSymbol should never be inspected directly.
else {
val pre1 = this(pre)
val args1 = args mapConserve (this)
- val sym1 = adaptToNewRun(pre1, sym)
- if ((pre1 eq pre) && (sym1 eq sym) && (args1 eq args)/* && sym.isExternal*/) tp
- else typeRef(pre1, sym1, args1)
+ try {
+ val sym1 = adaptToNewRun(pre1, sym)
+ if ((pre1 eq pre) && (sym1 eq sym) && (args1 eq args)/* && sym.isExternal*/) tp
+ else typeRef(pre1, sym1, args1)
+ } catch {
+ case ex: MissingAliasException =>
+ apply(tp.dealias)
+ }
}
case MethodType(params, restp) =>
val restp1 = this(restp)