diff options
author | Martin Odersky <odersky@gmail.com> | 2013-03-25 12:18:34 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-03-25 12:18:34 +0100 |
commit | 27a508c50482f4053591ed740f09ecced5bf749b (patch) | |
tree | 936cf263cc1236bb308cc786c0f7ee0cdc0f2fa8 /src/dotty/tools/dotc/core/Contexts.scala | |
parent | 4a17f0d1e17adecbdc4755bf719feff18d115318 (diff) | |
download | dotty-27a508c50482f4053591ed740f09ecced5bf749b.tar.gz dotty-27a508c50482f4053591ed740f09ecced5bf749b.tar.bz2 dotty-27a508c50482f4053591ed740f09ecced5bf749b.zip |
More fixes for classfile reading.
In particular: Survive malformed type errors. Make trees cloneable. and others more.
Diffstat (limited to 'src/dotty/tools/dotc/core/Contexts.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Contexts.scala | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index ecb22f71a..241d41da9 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -48,7 +48,7 @@ object Contexts { with SymDenotations with Reporting with Cloneable { thiscontext => - implicit val ctx: Context = this + implicit def ctx: Context = this /** The context base at the root */ val base: ContextBase @@ -128,6 +128,13 @@ object Contexts { protected def diagnostics_=(diagnostics: Option[StringBuilder]) = _diagnostics = diagnostics def diagnostics: Option[StringBuilder] = _diagnostics + /** Should prefix of type selections to be checked whether it's stable? + * Disabled when reading Scala pickled information. + */ + private var _checkPrefix: Boolean = true + protected def checkPrefix_=(checkPrefix: Boolean) = _checkPrefix = checkPrefix + def checkPrefix: Boolean = _checkPrefix + /** Leave message in diagnostics buffer if it exists */ def diagnose(str: => String) = for (sb <- diagnostics) { @@ -206,6 +213,7 @@ object Contexts { def withTree(tree: Tree): this.type = { this.tree = tree; this } def withReporter(reporter: Reporter): this.type = { this.reporter = reporter; this } def withDiagnostics(diagnostics: Option[StringBuilder]): this.type = { this.diagnostics = diagnostics; this } + def withCheckPrefix(checkPrefix: Boolean): this.type = { this.checkPrefix = checkPrefix; this } def withPhase(pid: PhaseId): this.type = withPeriod(Period(runId, pid)) |