diff options
author | Martin Odersky <odersky@gmail.com> | 2013-01-29 09:44:37 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-01-29 09:44:37 +0100 |
commit | bbc4f7a3234937e5f79e8310e6fff2f9b4af0f98 (patch) | |
tree | 36537cd033d5e37a489839f2970245df9db5e544 /src/dotty/tools/dotc/core/TypeOps.scala | |
parent | 9770566c50baff03a7e61344c203b29db8750e8f (diff) | |
download | dotty-bbc4f7a3234937e5f79e8310e6fff2f9b4af0f98.tar.gz dotty-bbc4f7a3234937e5f79e8310e6fff2f9b4af0f98.tar.bz2 dotty-bbc4f7a3234937e5f79e8310e6fff2f9b4af0f98.zip |
New Context architecture based on cloning
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeOps.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeOps.scala | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala index 5e25ab4a9..e75dc74f1 100644 --- a/src/dotty/tools/dotc/core/TypeOps.scala +++ b/src/dotty/tools/dotc/core/TypeOps.scala @@ -89,23 +89,22 @@ trait TypeOps { this: Context => // because volatile checking is done before all cycles are detected. // the case to avoid is an abstract type directly or // indirectly upper-bounded by itself. See #2918 - import ctx.root.{ volatileRecursions, pendingVolatiles } try { - volatileRecursions += 1 - if (volatileRecursions < LogVolatileThreshold) + ctx.volatileRecursions += 1 + if (ctx.volatileRecursions < LogVolatileThreshold) test - else if (pendingVolatiles(tp)) + else if (ctx.pendingVolatiles(tp)) false // we can return false here, because a cycle will be detected // here afterwards and an error will result anyway. else try { - pendingVolatiles += tp + ctx.pendingVolatiles += tp test } finally { - pendingVolatiles -= tp + ctx.pendingVolatiles -= tp } } finally { - volatileRecursions -= 1 + ctx.volatileRecursions -= 1 } } |