From fb649f4f344b4646ea10257e380155338747a26e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 11 May 2007 00:31:05 +0000 Subject: Fixed bug1096 --- src/compiler/scala/tools/nsc/symtab/Symbols.scala | 3 +++ src/compiler/scala/tools/nsc/typechecker/Namers.scala | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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 = { -- cgit v1.2.3