diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-04-08 22:22:51 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-04-08 22:22:51 +0200 |
commit | 9a7a7b889c9ded58ceaefb90f6ee208c9d2ab534 (patch) | |
tree | bb30156964be6feb7dc0f63a214a9c7b42f50596 /src | |
parent | 73e7181becbb2c7393d402c6234c4321d7f2704b (diff) | |
download | dotty-9a7a7b889c9ded58ceaefb90f6ee208c9d2ab534.tar.gz dotty-9a7a7b889c9ded58ceaefb90f6ee208c9d2ab534.tar.bz2 dotty-9a7a7b889c9ded58ceaefb90f6ee208c9d2ab534.zip |
Refactor checking in NamedTypes.
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index f8ae06a94..31567fee0 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1158,11 +1158,6 @@ object Types { private[this] var lastDenotation: Denotation = _ private[this] var lastSymbol: Symbol = _ private[this] var checkedPeriod = Nowhere - - /** Provided for debugging, can be used to intercept assignments of uncommon denotations - */ - private def checkDenot(d: Denotation)(implicit ctx: Context) = { - } // Invariants: // (1) checkedPeriod != Nowhere => lastDenotation != null @@ -1243,9 +1238,7 @@ object Types { // phase but a defined denotation earlier (e.g. a TypeRef to an abstract type // is undefined after erasure.) We need to be able to do time travel back and // forth also in these cases. - checkDenot(d) - lastDenotation = d - lastSymbol = d.symbol + setDenot(d) checkedPeriod = ctx.period } d @@ -1291,7 +1284,9 @@ object Types { if (Config.checkNoDoubleBindings) if (ctx.settings.YnoDoubleBindings.value) checkSymAssign(denot.symbol) - checkDenot(denot) + + // additional checks that intercept `denot` can be added here + lastDenotation = denot lastSymbol = denot.symbol } |