diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-01 15:59:52 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:07:40 +0200 |
commit | d63a6ba8540fb8ea7d01350ea68ff1ef0b53c5d4 (patch) | |
tree | 7d6abd4813a7254f6f735f4f95ffd5a20977a66b /src/dotty/tools/dotc/typer/Namer.scala | |
parent | c87a9dd1f34cd7afe3fba0edfa1463019eaa78bd (diff) | |
download | dotty-d63a6ba8540fb8ea7d01350ea68ff1ef0b53c5d4.tar.gz dotty-d63a6ba8540fb8ea7d01350ea68ff1ef0b53c5d4.tar.bz2 dotty-d63a6ba8540fb8ea7d01350ea68ff1ef0b53c5d4.zip |
Make Context#moreProperties strongly typed
To do this, factor out Key from Attachment into a new type, Property.Key.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Namer.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala index 06e798bdb..4dff02018 100644 --- a/src/dotty/tools/dotc/typer/Namer.scala +++ b/src/dotty/tools/dotc/typer/Namer.scala @@ -9,7 +9,7 @@ import Contexts._, Symbols._, Types._, SymDenotations._, Names._, NameOps._, Fla import ast.desugar, ast.desugar._ import ProtoTypes._ import util.Positions._ -import util.{Attachment, SourcePosition, DotClass} +import util.{Property, SourcePosition, DotClass} import collection.mutable import annotation.tailrec import ErrorReporting._ @@ -160,9 +160,9 @@ class Namer { typer: Typer => import untpd._ - val TypedAhead = new Attachment.Key[tpd.Tree] - val ExpandedTree = new Attachment.Key[Tree] - val SymOfTree = new Attachment.Key[Symbol] + val TypedAhead = new Property.Key[tpd.Tree] + val ExpandedTree = new Property.Key[Tree] + val SymOfTree = new Property.Key[Symbol] /** A partial map from unexpanded member and pattern defs and to their expansions. * Populated during enterSyms, emptied during typer. |