diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index b716c37114..e43c2b8554 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -535,8 +535,11 @@ trait Typers requires Analyzer { var mixins = templ.parents.tail map typedType // If first parent is a trait, make it first mixin and add its superclass as first parent while (supertpt.tpe.symbol != null && supertpt.tpe.symbol.initialize.isTrait) { - mixins = typedType(supertpt) :: mixins - supertpt = TypeTree(supertpt.tpe.parents.head) setOriginal supertpt /* setPos supertpt.pos */ + val supertpt1 = typedType(supertpt) + if (!supertpt1.tpe.isError) { + mixins = supertpt1 :: mixins + supertpt = TypeTree(supertpt1.tpe.parents.head) setOriginal supertpt /* setPos supertpt.pos */ + } } if (supertpt.hasSymbol) { val tparams = supertpt.symbol.typeParams @@ -1157,10 +1160,10 @@ trait Typers requires Analyzer { if (!attrError) { val attributed = if (defn.symbol.isModule) defn.symbol.moduleClass else defn.symbol - if (attributed.attributes.isEmpty) { +// if (attrInfos.length attributed.attributes.isEmpty) { does not work under resident! attributed.attributes = attrInfos defn.mods setAttr List(); - } +// } } } |