diff options
author | Martin Odersky <odersky@gmail.com> | 2007-05-11 00:31:05 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-05-11 00:31:05 +0000 |
commit | fb649f4f344b4646ea10257e380155338747a26e (patch) | |
tree | a89d5703264107c624daba4d31694be11a38c6cf /src | |
parent | b40e3b35cecdf7d827ce360dedf86d37767bbda8 (diff) | |
download | scala-fb649f4f344b4646ea10257e380155338747a26e.tar.gz scala-fb649f4f344b4646ea10257e380155338747a26e.tar.bz2 scala-fb649f4f344b4646ea10257e380155338747a26e.zip |
Fixed bug1096
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Symbols.scala | 3 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala index 8b01a58feb..6643c8c4fa 100644 --- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala +++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala @@ -250,6 +250,9 @@ trait Symbols { /** Is this symbol an implementation class for a mixin? */ final def isImplClass: boolean = isClass && hasFlag(IMPLCLASS) + /** Is thhis symbol early initialized */ + final def isEarly: boolean = isTerm && hasFlag(PRESUPER) + /** Is this symbol a trait which needs an implementation class? */ final def needsImplClass: boolean = isTrait && (!hasFlag(INTERFACE) || hasFlag(lateINTERFACE)) && !isImplClass diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 9fa3f66cf9..00d10e7479 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -142,7 +142,7 @@ trait Namers requires Analyzer { } def inConstructorFlag: long = - if (context.owner.isConstructor && !context.inConstructorSuffix) INCONSTRUCTOR + if (context.owner.isConstructor && !context.inConstructorSuffix || context.owner.isEarly) INCONSTRUCTOR else 0l private def enterClassSymbol(pos: Position, flags: long, name: Name): Symbol = { |