aboutsummaryrefslogtreecommitdiff
path: root/src/scala/annotation/internal/Child.scala
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-10-20 22:40:52 +0200
committerGitHub <noreply@github.com>2016-10-20 22:40:52 +0200
commit6070cce6a7887b6b3c65421bf0c37c92aec3182e (patch)
treea293dfb3444ee5b39983e83986df4444d5f0b0bc /src/scala/annotation/internal/Child.scala
parent3e76f3c26891e3df6afc6ff1ef086d9f876ffc07 (diff)
parent69c930023da720c1791ef41a8231cfe64910951b (diff)
downloaddotty-6070cce6a7887b6b3c65421bf0c37c92aec3182e.tar.gz
dotty-6070cce6a7887b6b3c65421bf0c37c92aec3182e.tar.bz2
dotty-6070cce6a7887b6b3c65421bf0c37c92aec3182e.zip
Merge pull request #1617 from dotty-staging/change-shadow-scala
Introduce scalaShadowing package
Diffstat (limited to 'src/scala/annotation/internal/Child.scala')
-rw-r--r--src/scala/annotation/internal/Child.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/scala/annotation/internal/Child.scala b/src/scala/annotation/internal/Child.scala
new file mode 100644
index 000000000..c90871945
--- /dev/null
+++ b/src/scala/annotation/internal/Child.scala
@@ -0,0 +1,16 @@
+package scala.annotation.internal
+
+import scala.annotation.Annotation
+
+/** An annotation to indicate a child class or object of the annotated class.
+ * E.g. if we have
+ *
+ * sealed class A
+ * case class B() extends A
+ * case class C() extends A
+ *
+ * Then the class symbol `A` would carry the annotations
+ * `@Child[Bref] @Child[Cref]` where `Bref`, `Cref` are TypeRefs
+ * referring to the class symbols of `B` and `C`
+ */
+class Child[T] extends Annotation