diff options
author | Martin Odersky <odersky@gmail.com> | 2014-02-11 15:16:17 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-02-11 15:16:17 +0100 |
commit | ce55c3b08da29acafaa3c43796ead9cf854f1d34 (patch) | |
tree | 9f38ff6c1e3108f66d6d8ea31035150695000ac9 /src/dotty/tools/dotc/typer/Typer.scala | |
parent | 459d78dccc40c94dd7da8b5b29762a494595778b (diff) | |
download | dotty-ce55c3b08da29acafaa3c43796ead9cf854f1d34.tar.gz dotty-ce55c3b08da29acafaa3c43796ead9cf854f1d34.tar.bz2 dotty-ce55c3b08da29acafaa3c43796ead9cf854f1d34.zip |
COnverted symOfTree and expandedTree to attachments.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index e68109c9b..8c066cdd0 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -967,9 +967,13 @@ class Typer extends Namer with Applications with Implicits { xtree.removeAttachment(TypedAhead) match { case Some(ttree) => ttree case none => - val sym = symOfTree.getOrElse(xtree, NoSymbol) - sym.ensureCompleted() - symOfTree.remove(xtree) + val sym = xtree.removeAttachment(SymOfTree) match { + case Some(sym) => + sym.ensureCompleted() + sym + case none => + NoSymbol + } def localContext = { val freshCtx = ctx.fresh.withTree(xtree) if (sym.exists) freshCtx.withOwner(sym) @@ -1059,7 +1063,7 @@ class Typer extends Namer with Applications with Implicits { buf += imp1 traverse(rest)(importContext(imp1.symbol, imp.selectors)) case (mdef: untpd.DefTree) :: rest => - expandedTree remove mdef match { + mdef.removeAttachment(ExpandedTree) match { case Some(xtree) => traverse(xtree :: rest) case none => |