diff options
author | odersky <odersky@gmail.com> | 2016-10-20 22:40:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-20 22:40:52 +0200 |
commit | 6070cce6a7887b6b3c65421bf0c37c92aec3182e (patch) | |
tree | a293dfb3444ee5b39983e83986df4444d5f0b0bc /src/scala/annotation/internal | |
parent | 3e76f3c26891e3df6afc6ff1ef086d9f876ffc07 (diff) | |
parent | 69c930023da720c1791ef41a8231cfe64910951b (diff) | |
download | dotty-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')
-rw-r--r-- | src/scala/annotation/internal/Alias.scala | 10 | ||||
-rw-r--r-- | src/scala/annotation/internal/AnnotationDefault.scala | 8 | ||||
-rw-r--r-- | src/scala/annotation/internal/Body.scala | 8 | ||||
-rw-r--r-- | src/scala/annotation/internal/Child.scala | 16 | ||||
-rw-r--r-- | src/scala/annotation/internal/InlineParam.scala | 6 | ||||
-rw-r--r-- | src/scala/annotation/internal/Repeated.scala | 10 | ||||
-rw-r--r-- | src/scala/annotation/internal/SourceFile.scala | 10 | ||||
-rw-r--r-- | src/scala/annotation/internal/UnsafeNonvariant.scala | 8 |
8 files changed, 76 insertions, 0 deletions
diff --git a/src/scala/annotation/internal/Alias.scala b/src/scala/annotation/internal/Alias.scala new file mode 100644 index 000000000..e3f56e70c --- /dev/null +++ b/src/scala/annotation/internal/Alias.scala @@ -0,0 +1,10 @@ +package scala.annotation.internal + +import scala.annotation.Annotation + +/** An annotation to record a Scala2 pickled alias. + * @param aliased A TermRef pointing to the aliased field. + */ +class Alias(aliased: Any) extends Annotation { + +} diff --git a/src/scala/annotation/internal/AnnotationDefault.scala b/src/scala/annotation/internal/AnnotationDefault.scala new file mode 100644 index 000000000..5280d091c --- /dev/null +++ b/src/scala/annotation/internal/AnnotationDefault.scala @@ -0,0 +1,8 @@ +package scala.annotation.internal + +import scala.annotation.Annotation + +/** An annotation to tag Java annotation default values */ +class AnnotationDefault extends Annotation { + +} diff --git a/src/scala/annotation/internal/Body.scala b/src/scala/annotation/internal/Body.scala new file mode 100644 index 000000000..b6aa0c0fb --- /dev/null +++ b/src/scala/annotation/internal/Body.scala @@ -0,0 +1,8 @@ +package scala.annotation.internal + +import scala.annotation.Annotation + +/** The class associated with a `BodyAnnotation`, which indicates + * an inline method's right hand side + */ +final class Body() extends Annotation 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 diff --git a/src/scala/annotation/internal/InlineParam.scala b/src/scala/annotation/internal/InlineParam.scala new file mode 100644 index 000000000..0b3649e89 --- /dev/null +++ b/src/scala/annotation/internal/InlineParam.scala @@ -0,0 +1,6 @@ +package scala.annotation.internal + +import scala.annotation.Annotation + +/** An annotation produced by Namer to indicate an inline parameter */ +final class InlineParam() extends Annotation diff --git a/src/scala/annotation/internal/Repeated.scala b/src/scala/annotation/internal/Repeated.scala new file mode 100644 index 000000000..75eb3bc25 --- /dev/null +++ b/src/scala/annotation/internal/Repeated.scala @@ -0,0 +1,10 @@ +package scala.annotation.internal + +import scala.annotation.Annotation + +/** An annotation produced by desugaring to indicate that a + * sequence is a repeated parameter. I.e. + * + * T* is expanded by Desugar to Seq[T] @Repeated + */ +final class Repeated() extends Annotation diff --git a/src/scala/annotation/internal/SourceFile.scala b/src/scala/annotation/internal/SourceFile.scala new file mode 100644 index 000000000..b203869cf --- /dev/null +++ b/src/scala/annotation/internal/SourceFile.scala @@ -0,0 +1,10 @@ +package scala.annotation.internal + +import scala.annotation.Annotation + +/** An annotation to record a Scala2 pickled alias. + * @param aliased A TermRef pointing to the aliased field. + */ +class SourceFile(path: String) extends Annotation { + +} diff --git a/src/scala/annotation/internal/UnsafeNonvariant.scala b/src/scala/annotation/internal/UnsafeNonvariant.scala new file mode 100644 index 000000000..b33df65d6 --- /dev/null +++ b/src/scala/annotation/internal/UnsafeNonvariant.scala @@ -0,0 +1,8 @@ +package scala.annotation.internal + +import scala.annotation.Annotation + +/** This annotation is used as a marker for unsafe + * instantiations in asSeenFrom. See TypeOps.asSeenfrom for an explanation. + */ +class UnsafeNonvariant extends Annotation |