From 432f9368011e0fd9e89ca0e18082bfec180baf32 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 10 Sep 2012 09:40:03 -0700 Subject: Experimental option -Ybreak-cycles. Overcomes cycles encountered during classfile parsing in possibly sketchy fashion. "illegal cyclic reference involving class Foo" is the watchword. See SI-3809. --- src/compiler/scala/tools/nsc/Global.scala | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/compiler/scala/tools/nsc/Global.scala') diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index cb5e2ad555..fb9539e2b2 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -1046,6 +1046,12 @@ class Global(var currentSettings: Settings, var reporter: Reporter) def currentUnit: CompilationUnit = if (currentRun eq null) NoCompilationUnit else currentRun.currentUnit def currentSource: SourceFile = if (currentUnit.exists) currentUnit.source else lastSeenSourceFile + override def isPastTyper = ( + (curRun ne null) + && (currentRun.typerPhase ne null) + && (globalPhase.id > currentRun.typerPhase.id) + ) + // TODO - trim these to the absolute minimum. @inline final def exitingErasure[T](op: => T): T = exitingPhase(currentRun.erasurePhase)(op) @inline final def exitingPostErasure[T](op: => T): T = exitingPhase(currentRun.posterasurePhase)(op) -- cgit v1.2.3