aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymbolLoaders.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-03-03 16:10:21 +0100
committerMartin Odersky <odersky@gmail.com>2013-03-03 16:10:21 +0100
commita1049e6227d412ce6bdd9065a350cb20921987e2 (patch)
tree506849218a5178916e6fa87e0d0f0636e50e4434 /src/dotty/tools/dotc/core/SymbolLoaders.scala
parent30bfa5b1be62652fc07292d36ed1261edbcdb362 (diff)
downloaddotty-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/SymbolLoaders.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymbolLoaders.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/SymbolLoaders.scala b/src/dotty/tools/dotc/core/SymbolLoaders.scala
index 59835beda..9559db68a 100644
--- a/src/dotty/tools/dotc/core/SymbolLoaders.scala
+++ b/src/dotty/tools/dotc/core/SymbolLoaders.scala
@@ -20,7 +20,7 @@ class SymbolLoaders {
protected def enterIfNew(owner: Symbol, member: Symbol, completer: SymbolLoader)(implicit ctx: Context): Symbol = {
assert(owner.info.decls.lookup(member.name) == NoSymbol, owner.fullName + "." + member.name)
- owner.info.decls enter member
+ owner.asClass.enter(member)
member
}
@@ -57,7 +57,7 @@ class SymbolLoaders {
else if (ctx.settings.termConflict.value == "package") {
ctx.warning(
s"Resolving package/object name conflict in favor of package ${preExisting.fullName}. The object will be inaccessible.")
- owner.info.decls.unlink(preExisting)
+ owner.asClass.delete(preExisting)
} else {
ctx.warning(
s"Resolving package/object name conflict in favor of object ${preExisting.fullName}. The package will be inaccessible.")