aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/util/Property.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-09-01 15:59:52 +0200
committerMartin Odersky <odersky@gmail.com>2016-10-02 16:07:40 +0200
commitd63a6ba8540fb8ea7d01350ea68ff1ef0b53c5d4 (patch)
tree7d6abd4813a7254f6f735f4f95ffd5a20977a66b /src/dotty/tools/dotc/util/Property.scala
parentc87a9dd1f34cd7afe3fba0edfa1463019eaa78bd (diff)
downloaddotty-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/util/Property.scala')
-rw-r--r--src/dotty/tools/dotc/util/Property.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/util/Property.scala b/src/dotty/tools/dotc/util/Property.scala
new file mode 100644
index 000000000..608fc88e6
--- /dev/null
+++ b/src/dotty/tools/dotc/util/Property.scala
@@ -0,0 +1,10 @@
+package dotty.tools.dotc.util
+
+/** Defines a key type with which to tag properties, such as attachments
+ * or context properties
+ */
+object Property {
+
+ /** The class of keys for properties of type V */
+ class Key[+V]
+} \ No newline at end of file