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/ast/Trees.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/ast/Trees.scala')
-rw-r--r-- | src/dotty/tools/dotc/ast/Trees.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/ast/Trees.scala b/src/dotty/tools/dotc/ast/Trees.scala index bb6fbd5ba..3b5de9308 100644 --- a/src/dotty/tools/dotc/ast/Trees.scala +++ b/src/dotty/tools/dotc/ast/Trees.scala @@ -12,7 +12,7 @@ import collection.immutable.IndexedSeq import collection.mutable.ListBuffer import parsing.Tokens.Token import printing.Printer -import util.{Stats, Attachment, DotClass} +import util.{Stats, Attachment, Property, DotClass} import annotation.unchecked.uncheckedVariance import language.implicitConversions import parsing.Scanners.Comment @@ -30,8 +30,8 @@ object Trees { /** The total number of created tree nodes, maintained if Stats.enabled */ @sharable var ntrees = 0 - /** Attachment key for trees with documentation strings attached */ - val DocComment = new Attachment.Key[Comment] + /** Property key for trees with documentation strings attached */ + val DocComment = new Property.Key[Comment] @sharable private var nextId = 0 // for debugging |