diff options
author | Martin Odersky <odersky@gmail.com> | 2015-11-08 10:42:02 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-11-09 15:45:40 +0100 |
commit | a1bd4dc57c9f1dbf548fa9f6ea3c4d2895ca1d35 (patch) | |
tree | e76592410a9a19fdd81684bf3580f8de639e86a0 /src/dotty/tools | |
parent | 4f01f62ac216fa9034d343828aa6f4be626d9b36 (diff) | |
download | dotty-a1bd4dc57c9f1dbf548fa9f6ea3c4d2895ca1d35.tar.gz dotty-a1bd4dc57c9f1dbf548fa9f6ea3c4d2895ca1d35.tar.bz2 dotty-a1bd4dc57c9f1dbf548fa9f6ea3c4d2895ca1d35.zip |
Rename AnnotRef -> AnnotType
Diffstat (limited to 'src/dotty/tools')
-rw-r--r-- | src/dotty/tools/dotc/ast/Desugar.scala | 2 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Annotations.scala | 4 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Definitions.scala | 109 |
3 files changed, 57 insertions, 58 deletions
diff --git a/src/dotty/tools/dotc/ast/Desugar.scala b/src/dotty/tools/dotc/ast/Desugar.scala index e51510cdf..36c99a12b 100644 --- a/src/dotty/tools/dotc/ast/Desugar.scala +++ b/src/dotty/tools/dotc/ast/Desugar.scala @@ -805,7 +805,7 @@ object desugar { if ((ctx.mode is Mode.Type) && op == nme.raw.STAR) { val seqType = if (ctx.compilationUnit.isJava) defn.ArrayType else defn.SeqType Annotated( - New(ref(defn.RepeatedAnnotRef), Nil :: Nil), + New(ref(defn.RepeatedAnnotType), Nil :: Nil), AppliedTypeTree(ref(seqType), t)) } else { assert(ctx.mode.isExpr || ctx.reporter.hasErrors, ctx.mode) diff --git a/src/dotty/tools/dotc/core/Annotations.scala b/src/dotty/tools/dotc/core/Annotations.scala index 0aedb16a0..b9c0eca43 100644 --- a/src/dotty/tools/dotc/core/Annotations.scala +++ b/src/dotty/tools/dotc/core/Annotations.scala @@ -91,12 +91,12 @@ object Annotations { def makeChild(sym: Symbol)(implicit ctx: Context) = deferred(defn.ChildAnnot, - implicit ctx => New(defn.ChildAnnotRef.appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil)) + implicit ctx => New(defn.ChildAnnotType.appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil)) } def ThrowsAnnotation(cls: ClassSymbol)(implicit ctx: Context) = { val tref = cls.typeRef - Annotation(defn.ThrowsAnnotRef.appliedTo(tref), Ident(tref)) + Annotation(defn.ThrowsAnnotType.appliedTo(tref), Ident(tref)) } /** A decorator that provides queries for specific annotations diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala index d8060c827..d9cb71105 100644 --- a/src/dotty/tools/dotc/core/Definitions.scala +++ b/src/dotty/tools/dotc/core/Definitions.scala @@ -412,60 +412,60 @@ class Definitions { def StaticAnnotationClass = StaticAnnotationType.symbol.asClass // Annotation classes - lazy val AliasAnnotRef = ctx.requiredClassRef("dotty.annotation.internal.Alias") - def AliasAnnot = AliasAnnotRef.symbol.asClass - lazy val AnnotationDefaultAnnotRef = ctx.requiredClassRef("dotty.annotation.internal.AnnotationDefault") - def AnnotationDefaultAnnot = AnnotationDefaultAnnotRef.symbol.asClass - lazy val ChildAnnotRef = ctx.requiredClassRef("dotty.annotation.internal.Child") - def ChildAnnot = ChildAnnotRef.symbol.asClass - lazy val CovariantBetweenAnnotRef = ctx.requiredClassRef("dotty.annotation.internal.CovariantBetween") - def CovariantBetweenAnnot = CovariantBetweenAnnotRef.symbol.asClass - lazy val ContravariantBetweenAnnotRef = ctx.requiredClassRef("dotty.annotation.internal.ContravariantBetween") - def ContravariantBetweenAnnot = ContravariantBetweenAnnotRef.symbol.asClass - lazy val DeprecatedAnnotRef = ctx.requiredClassRef("scala.deprecated") - def DeprecatedAnnot = DeprecatedAnnotRef.symbol.asClass - lazy val InvariantBetweenAnnotRef = ctx.requiredClassRef("dotty.annotation.internal.InvariantBetween") - def InvariantBetweenAnnot = InvariantBetweenAnnotRef.symbol.asClass - lazy val MigrationAnnotRef = ctx.requiredClassRef("scala.annotation.migration") - def MigrationAnnot = MigrationAnnotRef.symbol.asClass - lazy val NativeAnnotRef = ctx.requiredClassRef("scala.native") - def NativeAnnot = NativeAnnotRef.symbol.asClass - lazy val RemoteAnnotRef = ctx.requiredClassRef("scala.remote") - def RemoteAnnot = RemoteAnnotRef.symbol.asClass - lazy val RepeatedAnnotRef = ctx.requiredClassRef("dotty.annotation.internal.Repeated") - def RepeatedAnnot = RepeatedAnnotRef.symbol.asClass - lazy val ScalaSignatureAnnotRef = ctx.requiredClassRef("scala.reflect.ScalaSignature") - def ScalaSignatureAnnot = ScalaSignatureAnnotRef.symbol.asClass - lazy val ScalaLongSignatureAnnotRef = ctx.requiredClassRef("scala.reflect.ScalaLongSignature") - def ScalaLongSignatureAnnot = ScalaLongSignatureAnnotRef.symbol.asClass - lazy val ScalaStrictFPAnnotRef = ctx.requiredClassRef("scala.annotation.strictfp") - def ScalaStrictFPAnnot = ScalaStrictFPAnnotRef.symbol.asClass - lazy val SerialVersionUIDAnnotRef = ctx.requiredClassRef("scala.SerialVersionUID") - def SerialVersionUIDAnnot = SerialVersionUIDAnnotRef.symbol.asClass - lazy val TASTYSignatureAnnotRef = ctx.requiredClassRef("scala.annotation.internal.TASTYSignature") - def TASTYSignatureAnnot = TASTYSignatureAnnotRef.symbol.asClass - lazy val TASTYLongSignatureAnnotRef = ctx.requiredClassRef("scala.annotation.internal.TASTYLongSignature") - def TASTYLongSignatureAnnot = TASTYLongSignatureAnnotRef.symbol.asClass - lazy val TailrecAnnotRef = ctx.requiredClassRef("scala.annotation.tailrec") - def TailrecAnnot = TailrecAnnotRef.symbol.asClass - lazy val ThrowsAnnotRef = ctx.requiredClassRef("scala.throws") - def ThrowsAnnot = ThrowsAnnotRef.symbol.asClass - lazy val TransientAnnotRef = ctx.requiredClassRef("scala.transient") - def TransientAnnot = TransientAnnotRef.symbol.asClass - lazy val UncheckedAnnotRef = ctx.requiredClassRef("scala.unchecked") - def UncheckedAnnot = UncheckedAnnotRef.symbol.asClass - lazy val UncheckedStableAnnotRef = ctx.requiredClassRef("scala.annotation.unchecked.uncheckedStable") - def UncheckedStableAnnot = UncheckedStableAnnotRef.symbol.asClass - lazy val UncheckedVarianceAnnotRef = ctx.requiredClassRef("scala.annotation.unchecked.uncheckedVariance") - def UncheckedVarianceAnnot = UncheckedVarianceAnnotRef.symbol.asClass - lazy val VolatileAnnotRef = ctx.requiredClassRef("scala.volatile") - def VolatileAnnot = VolatileAnnotRef.symbol.asClass - lazy val FieldMetaAnnotRef = ctx.requiredClassRef("scala.annotation.meta.field") - def FieldMetaAnnot = FieldMetaAnnotRef.symbol.asClass - lazy val GetterMetaAnnotRef = ctx.requiredClassRef("scala.annotation.meta.getter") - def GetterMetaAnnot = GetterMetaAnnotRef.symbol.asClass - lazy val SetterMetaAnnotRef = ctx.requiredClassRef("scala.annotation.meta.setter") - def SetterMetaAnnot = SetterMetaAnnotRef.symbol.asClass + lazy val AliasAnnotType = ctx.requiredClassRef("dotty.annotation.internal.Alias") + def AliasAnnot = AliasAnnotType.symbol.asClass + lazy val AnnotationDefaultAnnotType = ctx.requiredClassRef("dotty.annotation.internal.AnnotationDefault") + def AnnotationDefaultAnnot = AnnotationDefaultAnnotType.symbol.asClass + lazy val ChildAnnotType = ctx.requiredClassRef("dotty.annotation.internal.Child") + def ChildAnnot = ChildAnnotType.symbol.asClass + lazy val CovariantBetweenAnnotType = ctx.requiredClassRef("dotty.annotation.internal.CovariantBetween") + def CovariantBetweenAnnot = CovariantBetweenAnnotType.symbol.asClass + lazy val ContravariantBetweenAnnotType = ctx.requiredClassRef("dotty.annotation.internal.ContravariantBetween") + def ContravariantBetweenAnnot = ContravariantBetweenAnnotType.symbol.asClass + lazy val DeprecatedAnnotType = ctx.requiredClassRef("scala.deprecated") + def DeprecatedAnnot = DeprecatedAnnotType.symbol.asClass + lazy val InvariantBetweenAnnotType = ctx.requiredClassRef("dotty.annotation.internal.InvariantBetween") + def InvariantBetweenAnnot = InvariantBetweenAnnotType.symbol.asClass + lazy val MigrationAnnotType = ctx.requiredClassRef("scala.annotation.migration") + def MigrationAnnot = MigrationAnnotType.symbol.asClass + lazy val NativeAnnotType = ctx.requiredClassRef("scala.native") + def NativeAnnot = NativeAnnotType.symbol.asClass + lazy val RemoteAnnotType = ctx.requiredClassRef("scala.remote") + def RemoteAnnot = RemoteAnnotType.symbol.asClass + lazy val RepeatedAnnotType = ctx.requiredClassRef("dotty.annotation.internal.Repeated") + def RepeatedAnnot = RepeatedAnnotType.symbol.asClass + lazy val ScalaSignatureAnnotType = ctx.requiredClassRef("scala.reflect.ScalaSignature") + def ScalaSignatureAnnot = ScalaSignatureAnnotType.symbol.asClass + lazy val ScalaLongSignatureAnnotType = ctx.requiredClassRef("scala.reflect.ScalaLongSignature") + def ScalaLongSignatureAnnot = ScalaLongSignatureAnnotType.symbol.asClass + lazy val ScalaStrictFPAnnotType = ctx.requiredClassRef("scala.annotation.strictfp") + def ScalaStrictFPAnnot = ScalaStrictFPAnnotType.symbol.asClass + lazy val SerialVersionUIDAnnotType = ctx.requiredClassRef("scala.SerialVersionUID") + def SerialVersionUIDAnnot = SerialVersionUIDAnnotType.symbol.asClass + lazy val TASTYSignatureAnnotType = ctx.requiredClassRef("scala.annotation.internal.TASTYSignature") + def TASTYSignatureAnnot = TASTYSignatureAnnotType.symbol.asClass + lazy val TASTYLongSignatureAnnotType = ctx.requiredClassRef("scala.annotation.internal.TASTYLongSignature") + def TASTYLongSignatureAnnot = TASTYLongSignatureAnnotType.symbol.asClass + lazy val TailrecAnnotType = ctx.requiredClassRef("scala.annotation.tailrec") + def TailrecAnnot = TailrecAnnotType.symbol.asClass + lazy val ThrowsAnnotType = ctx.requiredClassRef("scala.throws") + def ThrowsAnnot = ThrowsAnnotType.symbol.asClass + lazy val TransientAnnotType = ctx.requiredClassRef("scala.transient") + def TransientAnnot = TransientAnnotType.symbol.asClass + lazy val UncheckedAnnotType = ctx.requiredClassRef("scala.unchecked") + def UncheckedAnnot = UncheckedAnnotType.symbol.asClass + lazy val UncheckedStableAnnotType = ctx.requiredClassRef("scala.annotation.unchecked.uncheckedStable") + def UncheckedStableAnnot = UncheckedStableAnnotType.symbol.asClass + lazy val UncheckedVarianceAnnotType = ctx.requiredClassRef("scala.annotation.unchecked.uncheckedVariance") + def UncheckedVarianceAnnot = UncheckedVarianceAnnotType.symbol.asClass + lazy val VolatileAnnotType = ctx.requiredClassRef("scala.volatile") + def VolatileAnnot = VolatileAnnotType.symbol.asClass + lazy val FieldMetaAnnotType = ctx.requiredClassRef("scala.annotation.meta.field") + def FieldMetaAnnot = FieldMetaAnnotType.symbol.asClass + lazy val GetterMetaAnnotType = ctx.requiredClassRef("scala.annotation.meta.getter") + def GetterMetaAnnot = GetterMetaAnnotType.symbol.asClass + lazy val SetterMetaAnnotType = ctx.requiredClassRef("scala.annotation.meta.setter") + def SetterMetaAnnot = SetterMetaAnnotType.symbol.asClass // convenient one-parameter method types def methOfAny(tp: Type) = MethodType(List(AnyType), tp) @@ -476,7 +476,6 @@ class Definitions { def RepeatedParamType = RepeatedParamClass.typeRef def ThrowableType = ThrowableClass.typeRef - def VolatileAnnotType = VolatileAnnotRef def ClassType(arg: Type)(implicit ctx: Context) = { val ctype = ClassClass.typeRef |