aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Symbols.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-01-29 09:44:37 +0100
committerMartin Odersky <odersky@gmail.com>2013-01-29 09:44:37 +0100
commitbbc4f7a3234937e5f79e8310e6fff2f9b4af0f98 (patch)
tree36537cd033d5e37a489839f2970245df9db5e544 /src/dotty/tools/dotc/core/Symbols.scala
parent9770566c50baff03a7e61344c203b29db8750e8f (diff)
downloaddotty-bbc4f7a3234937e5f79e8310e6fff2f9b4af0f98.tar.gz
dotty-bbc4f7a3234937e5f79e8310e6fff2f9b4af0f98.tar.bz2
dotty-bbc4f7a3234937e5f79e8310e6fff2f9b4af0f98.zip
New Context architecture based on cloning
Diffstat (limited to 'src/dotty/tools/dotc/core/Symbols.scala')
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index 74c29802d..127e36f4d 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -285,16 +285,15 @@ object Symbols {
def superId(implicit ctx: Context): Int = {
val hint = superIdHint
- val rctx = ctx.root
- if (hint >= 0 && hint <= rctx.lastSuperId && (rctx.classOfId(hint) eq this)) hint
+ if (hint >= 0 && hint <= ctx.lastSuperId && (ctx.classOfId(hint) eq this)) hint
else {
- val id = rctx.superIdOfClass get this match {
+ val id = ctx.superIdOfClass get this match {
case Some(id) =>
id
case None =>
- val id = rctx.nextSuperId
- rctx.superIdOfClass(this) = id
- rctx.classOfId(id) = this
+ val id = ctx.nextSuperId
+ ctx.superIdOfClass(this) = id
+ ctx.classOfId(id) = this
id
}
superIdHint = id
@@ -312,7 +311,7 @@ object Symbols {
override def exists = false
}
- implicit def defn(implicit ctx: Context): Definitions = ctx.root.definitions
+ implicit def defn(implicit ctx: Context): Definitions = ctx.definitions
implicit def toFlagSet(sym: Symbol)(implicit ctx: Context): FlagSet = sym.flags