Skip to content

Commit 69c9300

Browse files
committed
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.
1 parent 259332c commit 69c9300

11 files changed

+20
-32
lines changed

src/dotty/Pair.scala

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/dotty/Singleton.scala

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,6 @@ class Definitions {
420420
lazy val StringAdd_plusR = StringAddClass.requiredMethodRef(nme.raw.PLUS)
421421
def StringAdd_+(implicit ctx: Context) = StringAdd_plusR.symbol
422422

423-
lazy val PairType: TypeRef = ctx.requiredClassRef("dotty.Pair")
424-
def PairClass(implicit ctx: Context) = PairType.symbol.asClass
425423
lazy val PartialFunctionType: TypeRef = ctx.requiredClassRef("scala.PartialFunction")
426424
def PartialFunctionClass(implicit ctx: Context) = PartialFunctionType.symbol.asClass
427425
lazy val AbstractPartialFunctionType: TypeRef = ctx.requiredClassRef("scala.runtime.AbstractPartialFunction")
@@ -460,37 +458,37 @@ class Definitions {
460458
def StaticAnnotationClass(implicit ctx: Context) = StaticAnnotationType.symbol.asClass
461459

462460
// Annotation classes
463-
lazy val AliasAnnotType = ctx.requiredClassRef("dotty.annotation.internal.Alias")
461+
lazy val AliasAnnotType = ctx.requiredClassRef("scala.annotation.internal.Alias")
464462
def AliasAnnot(implicit ctx: Context) = AliasAnnotType.symbol.asClass
465-
lazy val AnnotationDefaultAnnotType = ctx.requiredClassRef("dotty.annotation.internal.AnnotationDefault")
463+
lazy val AnnotationDefaultAnnotType = ctx.requiredClassRef("scala.annotation.internal.AnnotationDefault")
466464
def AnnotationDefaultAnnot(implicit ctx: Context) = AnnotationDefaultAnnotType.symbol.asClass
467-
lazy val BodyAnnotType = ctx.requiredClassRef("dotty.annotation.internal.Body")
465+
lazy val BodyAnnotType = ctx.requiredClassRef("scala.annotation.internal.Body")
468466
def BodyAnnot(implicit ctx: Context) = BodyAnnotType.symbol.asClass
469-
lazy val ChildAnnotType = ctx.requiredClassRef("dotty.annotation.internal.Child")
467+
lazy val ChildAnnotType = ctx.requiredClassRef("scala.annotation.internal.Child")
470468
def ChildAnnot(implicit ctx: Context) = ChildAnnotType.symbol.asClass
471-
lazy val CovariantBetweenAnnotType = ctx.requiredClassRef("dotty.annotation.internal.CovariantBetween")
469+
lazy val CovariantBetweenAnnotType = ctx.requiredClassRef("scala.annotation.internal.CovariantBetween")
472470
def CovariantBetweenAnnot(implicit ctx: Context) = CovariantBetweenAnnotType.symbol.asClass
473-
lazy val ContravariantBetweenAnnotType = ctx.requiredClassRef("dotty.annotation.internal.ContravariantBetween")
471+
lazy val ContravariantBetweenAnnotType = ctx.requiredClassRef("scala.annotation.internal.ContravariantBetween")
474472
def ContravariantBetweenAnnot(implicit ctx: Context) = ContravariantBetweenAnnotType.symbol.asClass
475473
lazy val DeprecatedAnnotType = ctx.requiredClassRef("scala.deprecated")
476474
def DeprecatedAnnot(implicit ctx: Context) = DeprecatedAnnotType.symbol.asClass
477475
lazy val ImplicitNotFoundAnnotType = ctx.requiredClassRef("scala.annotation.implicitNotFound")
478476
def ImplicitNotFoundAnnot(implicit ctx: Context) = ImplicitNotFoundAnnotType.symbol.asClass
479477
lazy val InlineAnnotType = ctx.requiredClassRef("scala.inline")
480478
def InlineAnnot(implicit ctx: Context) = InlineAnnotType.symbol.asClass
481-
lazy val InlineParamAnnotType = ctx.requiredClassRef("dotty.annotation.internal.InlineParam")
479+
lazy val InlineParamAnnotType = ctx.requiredClassRef("scala.annotation.internal.InlineParam")
482480
def InlineParamAnnot(implicit ctx: Context) = InlineParamAnnotType.symbol.asClass
483-
lazy val InvariantBetweenAnnotType = ctx.requiredClassRef("dotty.annotation.internal.InvariantBetween")
481+
lazy val InvariantBetweenAnnotType = ctx.requiredClassRef("scala.annotation.internal.InvariantBetween")
484482
def InvariantBetweenAnnot(implicit ctx: Context) = InvariantBetweenAnnotType.symbol.asClass
485483
lazy val MigrationAnnotType = ctx.requiredClassRef("scala.annotation.migration")
486484
def MigrationAnnot(implicit ctx: Context) = MigrationAnnotType.symbol.asClass
487485
lazy val NativeAnnotType = ctx.requiredClassRef("scala.native")
488486
def NativeAnnot(implicit ctx: Context) = NativeAnnotType.symbol.asClass
489487
lazy val RemoteAnnotType = ctx.requiredClassRef("scala.remote")
490488
def RemoteAnnot(implicit ctx: Context) = RemoteAnnotType.symbol.asClass
491-
lazy val RepeatedAnnotType = ctx.requiredClassRef("dotty.annotation.internal.Repeated")
489+
lazy val RepeatedAnnotType = ctx.requiredClassRef("scala.annotation.internal.Repeated")
492490
def RepeatedAnnot(implicit ctx: Context) = RepeatedAnnotType.symbol.asClass
493-
lazy val SourceFileAnnotType = ctx.requiredClassRef("dotty.annotation.internal.SourceFile")
491+
lazy val SourceFileAnnotType = ctx.requiredClassRef("scala.annotation.internal.SourceFile")
494492
def SourceFileAnnot(implicit ctx: Context) = SourceFileAnnotType.symbol.asClass
495493
lazy val ScalaSignatureAnnotType = ctx.requiredClassRef("scala.reflect.ScalaSignature")
496494
def ScalaSignatureAnnot(implicit ctx: Context) = ScalaSignatureAnnotType.symbol.asClass
@@ -520,7 +518,7 @@ class Definitions {
520518
def UncheckedStableAnnot(implicit ctx: Context) = UncheckedStableAnnotType.symbol.asClass
521519
lazy val UncheckedVarianceAnnotType = ctx.requiredClassRef("scala.annotation.unchecked.uncheckedVariance")
522520
def UncheckedVarianceAnnot(implicit ctx: Context) = UncheckedVarianceAnnotType.symbol.asClass
523-
lazy val UnsafeNonvariantAnnotType = ctx.requiredClassRef("dotty.annotation.internal.UnsafeNonvariant")
521+
lazy val UnsafeNonvariantAnnotType = ctx.requiredClassRef("scala.annotation.internal.UnsafeNonvariant")
524522
def UnsafeNonvariantAnnot(implicit ctx: Context) = UnsafeNonvariantAnnotType.symbol.asClass
525523
lazy val VolatileAnnotType = ctx.requiredClassRef("scala.volatile")
526524
def VolatileAnnot(implicit ctx: Context) = VolatileAnnotType.symbol.asClass

src/dotty/annotation/internal/Alias.scala renamed to src/scala/annotation/internal/Alias.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dotty.annotation.internal
1+
package scala.annotation.internal
22

33
import scala.annotation.Annotation
44

src/dotty/annotation/internal/AnnotationDefault.scala renamed to src/scala/annotation/internal/AnnotationDefault.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dotty.annotation.internal
1+
package scala.annotation.internal
22

33
import scala.annotation.Annotation
44

src/dotty/annotation/internal/Body.scala renamed to src/scala/annotation/internal/Body.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dotty.annotation.internal
1+
package scala.annotation.internal
22

33
import scala.annotation.Annotation
44

src/dotty/annotation/internal/Child.scala renamed to src/scala/annotation/internal/Child.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dotty.annotation.internal
1+
package scala.annotation.internal
22

33
import scala.annotation.Annotation
44

@@ -9,7 +9,7 @@ import scala.annotation.Annotation
99
* case class B() extends A
1010
* case class C() extends A
1111
*
12-
* Then the class symbol `A` would carry the annotations
12+
* Then the class symbol `A` would carry the annotations
1313
* `@Child[Bref] @Child[Cref]` where `Bref`, `Cref` are TypeRefs
1414
* referring to the class symbols of `B` and `C`
1515
*/

src/dotty/annotation/internal/InlineParam.scala renamed to src/scala/annotation/internal/InlineParam.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dotty.annotation.internal
1+
package scala.annotation.internal
22

33
import scala.annotation.Annotation
44

src/dotty/annotation/internal/Repeated.scala renamed to src/scala/annotation/internal/Repeated.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dotty.annotation.internal
1+
package scala.annotation.internal
22

33
import scala.annotation.Annotation
44

src/dotty/annotation/internal/SourceFile.scala renamed to src/scala/annotation/internal/SourceFile.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dotty.annotation.internal
1+
package scala.annotation.internal
22

33
import scala.annotation.Annotation
44

src/dotty/annotation/internal/UnsafeNonvariant.scala renamed to src/scala/annotation/internal/UnsafeNonvariant.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dotty.annotation.internal
1+
package scala.annotation.internal
22

33
import scala.annotation.Annotation
44

0 commit comments

Comments
 (0)