diff options
author | Martin Odersky <odersky@gmail.com> | 2009-01-08 16:23:11 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-01-08 16:23:11 +0000 |
commit | 86397c940a2b4df6166a9bc9ed3e03d008f4dd57 (patch) | |
tree | d42ce9c60542a512689331e086f9b44f46fce4f3 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | 0313e1c018d89fc4e4474f42308e81cfc60fdfb6 (diff) | |
download | scala-86397c940a2b4df6166a9bc9ed3e03d008f4dd57.tar.gz scala-86397c940a2b4df6166a9bc9ed3e03d008f4dd57.tar.bz2 scala-86397c940a2b4df6166a9bc9ed3e03d008f4dd57.zip |
fixed erroneous cyclic reference error conditio...
fixed erroneous cyclic reference error condition; generated new starr.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 34a7eb5732..8cc87d2321 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1556,17 +1556,19 @@ trait Typers { self: Analyzer => } } - def typedRefinement(stats: List[Tree]): List[Tree] = { + def typedRefinement(stats: List[Tree]) { namer.enterSyms(stats) - val stats1 = typedStats(stats, NoSymbol) - for (stat <- stats1 if stat.isDef) { - val member = stat.symbol - if (!(context.owner.info.baseClasses.tail forall - (bc => member.matchingSymbol(bc, context.owner.thisType) == NoSymbol))) { - member setFlag OVERRIDE + // need to delay rest of typedRefinement to avoid cyclic reference errors + unit.toCheck += { () => + val stats1 = typedStats(stats, NoSymbol) + for (stat <- stats1 if stat.isDef) { + val member = stat.symbol + if (!(context.owner.info.baseClasses.tail forall + (bc => member.matchingSymbol(bc, context.owner.thisType) == NoSymbol))) { + member setFlag OVERRIDE + } } } - stats1 } def typedImport(imp : Import) : Import = imp |