diff options
author | Martin Odersky <odersky@gmail.com> | 2006-07-24 16:23:29 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-07-24 16:23:29 +0000 |
commit | 7b8adeb8ff472948aeabdedb641659a5972df94a (patch) | |
tree | 63728b2ffbff704c4544381db3a906e8d495ff74 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | f901816b3fe8e4c179529335640cc76951c8974c (diff) | |
download | scala-7b8adeb8ff472948aeabdedb641659a5972df94a.tar.gz scala-7b8adeb8ff472948aeabdedb641659a5972df94a.tar.bz2 scala-7b8adeb8ff472948aeabdedb641659a5972df94a.zip |
Fixed bugs 666-668
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-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(); - } +// } } } |