aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r--src/dotty/tools/dotc/core/Annotations.scala4
-rw-r--r--src/dotty/tools/dotc/core/Constants.scala22
-rw-r--r--src/dotty/tools/dotc/core/Definitions.scala14
-rw-r--r--src/dotty/tools/dotc/core/TypeErasure.scala4
-rw-r--r--src/dotty/tools/dotc/core/TypeOps.scala2
-rw-r--r--src/dotty/tools/dotc/core/Types.scala2
-rw-r--r--src/dotty/tools/dotc/core/classfile/ClassfileParser.scala4
-rw-r--r--src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala4
8 files changed, 28 insertions, 28 deletions
diff --git a/src/dotty/tools/dotc/core/Annotations.scala b/src/dotty/tools/dotc/core/Annotations.scala
index 6d0fba337..0aedb16a0 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.ChildAnnot.typeRef.appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil))
+ implicit ctx => New(defn.ChildAnnotRef.appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil))
}
def ThrowsAnnotation(cls: ClassSymbol)(implicit ctx: Context) = {
val tref = cls.typeRef
- Annotation(defn.ThrowsAnnot.typeRef.appliedTo(tref), Ident(tref))
+ Annotation(defn.ThrowsAnnotRef.appliedTo(tref), Ident(tref))
}
/** A decorator that provides queries for specific annotations
diff --git a/src/dotty/tools/dotc/core/Constants.scala b/src/dotty/tools/dotc/core/Constants.scala
index 61a23bb9e..e13e07f58 100644
--- a/src/dotty/tools/dotc/core/Constants.scala
+++ b/src/dotty/tools/dotc/core/Constants.scala
@@ -54,17 +54,17 @@ object Constants {
def isAnyVal = UnitTag <= tag && tag <= DoubleTag
def tpe(implicit ctx: Context): Type = tag match {
- case UnitTag => defn.UnitClass.typeRef
- case BooleanTag => defn.BooleanClass.typeRef
- case ByteTag => defn.ByteClass.typeRef
- case ShortTag => defn.ShortClass.typeRef
- case CharTag => defn.CharClass.typeRef
- case IntTag => defn.IntClass.typeRef
- case LongTag => defn.LongClass.typeRef
- case FloatTag => defn.FloatClass.typeRef
- case DoubleTag => defn.DoubleClass.typeRef
- case StringTag => defn.StringClass.typeRef
- case NullTag => defn.NullClass.typeRef
+ case UnitTag => defn.UnitType
+ case BooleanTag => defn.BooleanType
+ case ByteTag => defn.ByteType
+ case ShortTag => defn.ShortType
+ case CharTag => defn.CharType
+ case IntTag => defn.IntType
+ case LongTag => defn.LongType
+ case FloatTag => defn.FloatType
+ case DoubleTag => defn.DoubleType
+ case StringTag => defn.StringType
+ case NullTag => defn.NullType
case ClazzTag => defn.ClassType(typeValue)
case EnumTag => defn.EnumType(symbolValue)
}
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala
index bec558d76..d8060c827 100644
--- a/src/dotty/tools/dotc/core/Definitions.scala
+++ b/src/dotty/tools/dotc/core/Definitions.scala
@@ -163,7 +163,7 @@ class Definitions {
cls.info = ClassInfo(cls.owner.thisType, cls, AnyClass.typeRef :: Nil, newScope)
completeClass(cls)
}
- def ObjectType: Type = ObjectClass.typeRef
+ def ObjectType = ObjectClass.typeRef
lazy val AnyRefAlias: TypeSymbol = newAliasType(tpnme.AnyRef, ObjectType)
def AnyRefType = AnyRefAlias.typeRef
@@ -404,12 +404,12 @@ class Definitions {
lazy val NonLocalReturnControlType: TypeRef = ctx.requiredClassRef("scala.runtime.NonLocalReturnControl")
// Annotation base classes
- lazy val AnnotationTypeRef = ctx.requiredClassRef("scala.annotation.Annotation")
- def AnnotationClass = AnnotationTypeRef.symbol.asClass
- lazy val ClassfileAnnotationTypeRef = ctx.requiredClassRef("scala.annotation.ClassfileAnnotation")
- def ClassfileAnnotationClass = ClassfileAnnotationTypeRef.symbol.asClass
- lazy val StaticAnnotationTypeRef = ctx.requiredClassRef("scala.annotation.StaticAnnotation")
- def StaticAnnotationClass = StaticAnnotationTypeRef.symbol.asClass
+ lazy val AnnotationType = ctx.requiredClassRef("scala.annotation.Annotation")
+ def AnnotationClass = AnnotationType.symbol.asClass
+ lazy val ClassfileAnnotationType = ctx.requiredClassRef("scala.annotation.ClassfileAnnotation")
+ def ClassfileAnnotationClass = ClassfileAnnotationType.symbol.asClass
+ lazy val StaticAnnotationType = ctx.requiredClassRef("scala.annotation.StaticAnnotation")
+ def StaticAnnotationClass = StaticAnnotationType.symbol.asClass
// Annotation classes
lazy val AliasAnnotRef = ctx.requiredClassRef("dotty.annotation.internal.Alias")
diff --git a/src/dotty/tools/dotc/core/TypeErasure.scala b/src/dotty/tools/dotc/core/TypeErasure.scala
index b76dd869a..8f116c85f 100644
--- a/src/dotty/tools/dotc/core/TypeErasure.scala
+++ b/src/dotty/tools/dotc/core/TypeErasure.scala
@@ -176,7 +176,7 @@ object TypeErasure {
else if (sym.isConstructor) outer.addParam(sym.owner.asClass, erase(tp)(erasureCtx))
else erase.eraseInfo(tp, sym)(erasureCtx) match {
case einfo: MethodType if sym.isGetter && einfo.resultType.isRef(defn.UnitClass) =>
- MethodType(Nil, defn.BoxedUnitClass.typeRef)
+ MethodType(Nil, defn.BoxedUnitType)
case einfo =>
einfo
}
@@ -360,7 +360,7 @@ class TypeErasure(isJava: Boolean, semiEraseVCs: Boolean, isConstructor: Boolean
else classParents.mapConserve(eraseTypeRef) match {
case tr :: trs1 =>
assert(!tr.classSymbol.is(Trait), cls)
- val tr1 = if (cls is Trait) defn.ObjectClass.typeRef else tr
+ val tr1 = if (cls is Trait) defn.ObjectType else tr
tr1 :: trs1.filterNot(_ isRef defn.ObjectClass)
case nil => nil
}
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala
index aa643256c..4cfc52909 100644
--- a/src/dotty/tools/dotc/core/TypeOps.scala
+++ b/src/dotty/tools/dotc/core/TypeOps.scala
@@ -481,7 +481,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
formals = formals.updated(name, tp1.typeParamNamed(name))
normalizeToRef(tp1)
case ErrorType =>
- defn.AnyClass.typeRef
+ defn.AnyType
case AnnotatedType(_, tpe) =>
normalizeToRef(tpe)
case _ =>
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 3bc76a20d..4cae047a9 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -964,7 +964,7 @@ object Types {
/** The first parent of this type, AnyRef if list of parents is empty */
def firstParent(implicit ctx: Context): TypeRef = parents match {
case p :: _ => p
- case _ => defn.AnyClass.typeRef
+ case _ => defn.AnyType
}
/** the self type of the underlying classtype */
diff --git a/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
index ca805f516..9ea24324b 100644
--- a/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
+++ b/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
@@ -104,7 +104,7 @@ class ClassfileParser(
/** Parse parents for Java classes. For Scala, return AnyRef, since the real type will be unpickled.
* Updates the read pointer of 'in'. */
def parseParents: List[Type] = {
- val superType = if (isAnnotation) { in.nextChar; defn.AnnotationClass.typeRef }
+ val superType = if (isAnnotation) { in.nextChar; defn.AnnotationType }
else pool.getSuperClass(in.nextChar).typeRef
val ifaceCount = in.nextChar
var ifaces = for (i <- (0 until ifaceCount).toList) yield pool.getSuperClass(in.nextChar).typeRef
@@ -115,7 +115,7 @@ class ClassfileParser(
// is found. If we treat constant subtyping specially, we might be able
// to do something there. But in any case, the until should be more efficient.
- if (isAnnotation) ifaces = defn.ClassfileAnnotationClass.typeRef :: ifaces
+ if (isAnnotation) ifaces = defn.ClassfileAnnotationType :: ifaces
superType :: ifaces
}
diff --git a/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala b/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala
index 9269109ad..f42169029 100644
--- a/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala
+++ b/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala
@@ -100,7 +100,7 @@ object Scala2Unpickler {
case cinfo => (Nil, cinfo)
}
var parentRefs = ctx.normalizeToClassRefs(parents, cls, decls)
- if (parentRefs.isEmpty) parentRefs = defn.ObjectClass.typeRef :: Nil
+ if (parentRefs.isEmpty) parentRefs = defn.ObjectType :: Nil
for (tparam <- tparams) {
val tsym = decls.lookup(tparam.name)
if (tsym.exists) tsym.setFlag(TypeParam)
@@ -852,7 +852,7 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
val end = readNat() + readIndex
// array elements are trees representing instances of scala.annotation.Annotation
SeqLiteral(
- defn.SeqType.appliedTo(defn.AnnotationClass.typeRef :: Nil),
+ defn.SeqType.appliedTo(defn.AnnotationType :: Nil),
until(end, () => readClassfileAnnotArg(readNat())))
}