diff options
author | Martin Odersky <odersky@gmail.com> | 2013-03-03 16:10:21 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-03-03 16:10:21 +0100 |
commit | a1049e6227d412ce6bdd9065a350cb20921987e2 (patch) | |
tree | 506849218a5178916e6fa87e0d0f0636e50e4434 /src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | |
parent | 30bfa5b1be62652fc07292d36ed1261edbcdb362 (diff) | |
download | dotty-a1049e6227d412ce6bdd9065a350cb20921987e2.tar.gz dotty-a1049e6227d412ce6bdd9065a350cb20921987e2.tar.bz2 dotty-a1049e6227d412ce6bdd9065a350cb20921987e2.zip |
Split scopes into immutable and mutable parts.
The goal is that symbols should be entered/deleted directly into classes instead of their scopes. This is necesaary so that invariant about fingerPrint can be maintained. We achieve it by making the info scope have immutable type, so an explicit cast is needed to get around that.
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/ClassfileParser.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala index 685ece6cb..5fbafb431 100644 --- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala +++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala @@ -26,8 +26,8 @@ class ClassfileParser( protected val staticModule: Symbol = moduleRoot.sourceModule - protected val instanceScope: Scope = newScope // the scope of all instance definitions - protected val staticScope: Scope = newScope // the scope of all static definitions + protected val instanceScope: MutableScope = newScope // the scope of all instance definitions + protected val staticScope: MutableScope = newScope // the scope of all static definitions protected var pool: ConstantPool = _ // the classfile's constant pool protected var currentClassName: Name = _ // JVM name of the current class @@ -707,7 +707,7 @@ class ClassfileParser( protected def getOwner(flags: Int): Symbol = if (isStatic(flags)) moduleRoot.symbol else classRoot.symbol - protected def getScope(flags: Int): Scope = + protected def getScope(flags: Int): MutableScope = if (isStatic(flags)) staticScope else instanceScope private def setPrivateWithin(denot: SymDenotation, jflags: Int) { |