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/Inliner.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/Inliner.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Inliner.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Inliner.scala b/src/dotty/tools/dotc/typer/Inliner.scala index 852689a75..4eb8588a6 100644 --- a/src/dotty/tools/dotc/typer/Inliner.scala +++ b/src/dotty/tools/dotc/typer/Inliner.scala @@ -18,7 +18,7 @@ import Annotations.Annotation import transform.ExplicitOuter import config.Printers.inlining import ErrorReporting.errorTree -import util.Attachment +import util.Property import collection.mutable object Inliner { @@ -28,7 +28,7 @@ object Inliner { lazy val body = tree } - private val InlinedBody = new Attachment.Key[InlinedBody] + private val InlinedBody = new Property.Key[InlinedBody] // to be used as attachment def attachBody(inlineAnnot: Annotation, tree: => Tree)(implicit ctx: Context): Unit = inlineAnnot.tree.putAttachment(InlinedBody, new InlinedBody(tree)) |