diff options
author | Martin Odersky <odersky@gmail.com> | 2015-12-11 19:59:04 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-12-21 18:02:09 +0100 |
commit | 5103f1720a26ac16c2b6b8bde1fe5717b3e5b78f (patch) | |
tree | fb87b835ef95af91f5d9303d5f596285ac2b525b /src/dotty/tools/dotc/core/Contexts.scala | |
parent | 4163b249428d1f27843ecc4e5b7c9c7dac0698dd (diff) | |
download | dotty-5103f1720a26ac16c2b6b8bde1fe5717b3e5b78f.tar.gz dotty-5103f1720a26ac16c2b6b8bde1fe5717b3e5b78f.tar.bz2 dotty-5103f1720a26ac16c2b6b8bde1fe5717b3e5b78f.zip |
Make asSeenFrom idempotent
Let asSeenFrom generate a marker annotated type
for any unsafe instantiation. Then cleanup in
typedSelect.
Diffstat (limited to 'src/dotty/tools/dotc/core/Contexts.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Contexts.scala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index 1a471537e..ae221cc3e 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -600,10 +600,16 @@ object Contexts { * of underlying during a controlled operation exists. */ private[core] val pendingUnderlying = new mutable.HashSet[Type] + /** A flag that some unsafe nonvariant instantiation was encountered + * in this run. Used as a shortcut to a avoid scans of types in + * Typer.typedSelect. + */ + private[dotty] var unsafeNonvariant: RunId = NoRunId + + // Phases state private[core] var phasesPlan: List[List[Phase]] = _ - // Phases state /** Phases by id */ private[core] var phases: Array[Phase] = _ |