diff options
author | Martin Odersky <odersky@gmail.com> | 2016-10-20 18:20:57 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-20 18:21:20 +0200 |
commit | 69c930023da720c1791ef41a8231cfe64910951b (patch) | |
tree | a293dfb3444ee5b39983e83986df4444d5f0b0bc /src/scala/annotation | |
parent | 259332c9bbc127a6936e2d53bbc609db9533f0f9 (diff) | |
download | dotty-69c930023da720c1791ef41a8231cfe64910951b.tar.gz dotty-69c930023da720c1791ef41a8231cfe64910951b.tar.bz2 dotty-69c930023da720c1791ef41a8231cfe64910951b.zip |
Move files out of the dotty package
- Remove unused classes Pair and Singleton.
- Move classes from dotty.annotation.internal
to scala.annotation.internal.
The only classes remaining now are in dotty.runtime
and DottyPredef. We should probably do something about them
as well at some point.
Diffstat (limited to 'src/scala/annotation')
-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 |