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.scala8
-rw-r--r--src/dotty/tools/dotc/core/Constants.scala22
-rw-r--r--src/dotty/tools/dotc/core/Definitions.scala72
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala8
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala4
-rw-r--r--src/dotty/tools/dotc/core/TypeComparer.scala2
-rw-r--r--src/dotty/tools/dotc/core/TypeOps.scala2
-rw-r--r--src/dotty/tools/dotc/core/Types.scala12
-rw-r--r--src/dotty/tools/dotc/core/pickling/ClassfileParser.scala22
-rw-r--r--src/dotty/tools/dotc/core/pickling/UnPickler.scala2
-rw-r--r--src/dotty/tools/dotc/core/transform/Erasure.scala4
11 files changed, 79 insertions, 79 deletions
diff --git a/src/dotty/tools/dotc/core/Annotations.scala b/src/dotty/tools/dotc/core/Annotations.scala
index 90b916971..6930429b5 100644
--- a/src/dotty/tools/dotc/core/Annotations.scala
+++ b/src/dotty/tools/dotc/core/Annotations.scala
@@ -37,7 +37,7 @@ object Annotations {
apply(cls, arg1 :: arg2 :: Nil)
def apply(cls: ClassSymbol, args: List[Tree])(implicit ctx: Context): Annotation =
- apply(cls.typeConstructor, args)
+ apply(cls.typeRef, args)
def apply(atp: Type, arg: Tree)(implicit ctx: Context): Annotation =
apply(atp, arg :: Nil)
@@ -58,11 +58,11 @@ object Annotations {
apply(defn.AliasAnnot, List(Ident(TermRef.withSig(sym.owner.thisType, sym.name, sym.signature).withDenot(sym))))
def makeChild(sym: Symbol)(implicit ctx: Context) =
- apply(defn.ChildAnnot.typeConstructor.appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil)
+ apply(defn.ChildAnnot.typeRef.appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil)
}
def ThrowsAnnotation(cls: ClassSymbol)(implicit ctx: Context) = {
- val tref = cls.symTypeRef
- Annotation(defn.ThrowsAnnot.typeConstructor.appliedTo(tref), Ident(tref))
+ val tref = cls.typeRef
+ Annotation(defn.ThrowsAnnot.typeRef.appliedTo(tref), Ident(tref))
}
} \ No newline at end of file
diff --git a/src/dotty/tools/dotc/core/Constants.scala b/src/dotty/tools/dotc/core/Constants.scala
index b2949aae7..50bebefe9 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.typeConstructor
- case BooleanTag => defn.BooleanClass.typeConstructor
- case ByteTag => defn.ByteClass.typeConstructor
- case ShortTag => defn.ShortClass.typeConstructor
- case CharTag => defn.CharClass.typeConstructor
- case IntTag => defn.IntClass.typeConstructor
- case LongTag => defn.LongClass.typeConstructor
- case FloatTag => defn.FloatClass.typeConstructor
- case DoubleTag => defn.DoubleClass.typeConstructor
- case StringTag => defn.StringClass.typeConstructor
- case NullTag => defn.NullClass.typeConstructor
+ 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 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 9d03d001f..f7f3bde87 100644
--- a/src/dotty/tools/dotc/core/Definitions.scala
+++ b/src/dotty/tools/dotc/core/Definitions.scala
@@ -144,9 +144,9 @@ class Definitions(implicit ctx: Context) {
lazy val NotNullClass = requiredClass("scala.NotNull")
lazy val NothingClass: ClassSymbol = newCompleteClassSymbol(
- ScalaPackageClass, tpnme.Nothing, AbstractFinal, List(AnyClass.typeConstructor))
+ ScalaPackageClass, tpnme.Nothing, AbstractFinal, List(AnyClass.typeRef))
lazy val NullClass: ClassSymbol = newCompleteClassSymbol(
- ScalaPackageClass, tpnme.Null, AbstractFinal, List(AnyRefAlias.typeConstructor))
+ ScalaPackageClass, tpnme.Null, AbstractFinal, List(AnyRefAlias.typeRef))
lazy val PredefModule = requiredModule("scala.Predef")
lazy val NilModule = requiredModule("scala.collection.immutable.Nil")
@@ -157,7 +157,7 @@ class Definitions(implicit ctx: Context) {
// but does not define it as an explicit class.
newCompleteClassSymbol(
ScalaPackageClass, tpnme.Singleton, Trait | Interface | Final,
- List(AnyClass.typeConstructor), EmptyScope)
+ List(AnyClass.typeRef), EmptyScope)
lazy val SeqClass: ClassSymbol = requiredClass("scala.collection.Seq")
lazy val ArrayClass: ClassSymbol = requiredClass("scala.Array")
lazy val uncheckedStableClass: ClassSymbol = requiredClass("scala.annotation.unchecked.uncheckedStable")
@@ -235,35 +235,35 @@ class Definitions(implicit ctx: Context) {
def methOfAnyRef(tp: Type) = MethodType(List(AnyRefType), tp)
// Derived types
- def AnyType: Type = AnyClass.typeConstructor
- def AnyValType: Type = AnyValClass.typeConstructor
- def ObjectType: Type = ObjectClass.typeConstructor
- def AnyRefType: Type = AnyRefAlias.typeConstructor
- def NotNullType: Type = NotNullClass.typeConstructor
- def NothingType: Type = NothingClass.typeConstructor
- def NullType: Type = NullClass.typeConstructor
- def SeqType: Type = SeqClass.typeConstructor
- def ArrayType: Type = ArrayClass.typeConstructor
+ def AnyType: Type = AnyClass.typeRef
+ def AnyValType: Type = AnyValClass.typeRef
+ def ObjectType: Type = ObjectClass.typeRef
+ def AnyRefType: Type = AnyRefAlias.typeRef
+ def NotNullType: Type = NotNullClass.typeRef
+ def NothingType: Type = NothingClass.typeRef
+ def NullType: Type = NullClass.typeRef
+ def SeqType: Type = SeqClass.typeRef
+ def ArrayType: Type = ArrayClass.typeRef
def ObjectArrayType = ArrayType.appliedTo(ObjectType)
- def UnitType: Type = UnitClass.typeConstructor
- def BooleanType: Type = BooleanClass.typeConstructor
- def ByteType: Type = ByteClass.typeConstructor
- def ShortType: Type = ShortClass.typeConstructor
- def CharType: Type = CharClass.typeConstructor
- def IntType: Type = IntClass.typeConstructor
- def LongType: Type = LongClass.typeConstructor
- def FloatType: Type = FloatClass.typeConstructor
- def DoubleType: Type = DoubleClass.typeConstructor
- def PairType: Type = PairClass.typeConstructor
- def StringType: Type = StringClass.typeConstructor
- def RepeatedParamType = RepeatedParamClass.typeConstructor
- def JavaRepeatedParamType = JavaRepeatedParamClass.typeConstructor
- def ThrowableType = ThrowableClass.typeConstructor
- def OptionType = OptionClass.typeConstructor
+ def UnitType: Type = UnitClass.typeRef
+ def BooleanType: Type = BooleanClass.typeRef
+ def ByteType: Type = ByteClass.typeRef
+ def ShortType: Type = ShortClass.typeRef
+ def CharType: Type = CharClass.typeRef
+ def IntType: Type = IntClass.typeRef
+ def LongType: Type = LongClass.typeRef
+ def FloatType: Type = FloatClass.typeRef
+ def DoubleType: Type = DoubleClass.typeRef
+ def PairType: Type = PairClass.typeRef
+ def StringType: Type = StringClass.typeRef
+ def RepeatedParamType = RepeatedParamClass.typeRef
+ def JavaRepeatedParamType = JavaRepeatedParamClass.typeRef
+ def ThrowableType = ThrowableClass.typeRef
+ def OptionType = OptionClass.typeRef
def ClassType(arg: Type)(implicit ctx: Context) = {
- val ctype = ClassClass.typeConstructor
+ val ctype = ClassClass.typeRef
if (ctx.phase.erasedTypes) ctype else ctype.appliedTo(arg)
}
@@ -273,11 +273,11 @@ class Definitions(implicit ctx: Context) {
// - sym: the symbol of the actual enumeration value (VAL1)
// - .owner: the ModuleClassSymbol of the enumeration (object E)
// - .linkedClass: the ClassSymbol of the enumeration (class E)
- sym.owner.linkedClass.typeConstructor
+ sym.owner.linkedClass.typeRef
object FunctionType {
def apply(args: List[Type], resultType: Type) =
- FunctionClass(args.length).typeConstructor.appliedTo(args :+ resultType)
+ FunctionClass(args.length).typeRef.appliedTo(args :+ resultType)
def unapply(ft: Type) = {
val tsym = ft.typeSymbol
lazy val targs = ft.typeArgs
@@ -362,7 +362,7 @@ class Definitions(implicit ctx: Context) {
val paramDecls = newScope
for ((v, i) <- vcs.zipWithIndex)
newTypeParam(cls, tpnme.higherKindedParamName(i), varianceFlags(v), paramDecls)
- denot.info = ClassInfo(ScalaPackageClass.thisType, cls, List(ObjectClass.typeConstructor), paramDecls)
+ denot.info = ClassInfo(ScalaPackageClass.thisType, cls, List(ObjectClass.typeRef), paramDecls)
}
}
@@ -657,8 +657,8 @@ class Definitions(implicit ctx: Context) {
// convenient one-argument parameter lists
lazy val anyparam = List(AnyClass.tpe)
- lazy val anyvalparam = List(AnyValClass.typeConstructor)
- lazy val anyrefparam = List(AnyRefClass.typeConstructor)
+ lazy val anyvalparam = List(AnyValClass.typeRef)
+ lazy val anyrefparam = List(AnyRefClass.typeRef)
// private parameter conveniences
private def booltype = BooleanClass.tpe
@@ -1205,7 +1205,7 @@ class Definitions(implicit ctx: Context) {
/** Given type U, creates a Type representing Class[_ <: U].
*/
def boundedClassType(upperBound: Type) =
- appliedTypeAsUpperBounds(ClassClass.typeConstructor, List(upperBound))
+ appliedTypeAsUpperBounds(ClassClass.typeRef, List(upperBound))
/** To avoid unchecked warnings on polymorphic classes, translate
* a Foo[T] into a Foo[_] for use in the pattern matcher.
@@ -1262,7 +1262,7 @@ class Definitions(implicit ctx: Context) {
// java.lang.Object. Java also special cases the return type.
lazy val Any_getClass = enterNewMethod(AnyClass, nme.getClass_, Nil, requiredMethod(ObjectClass, nme.getClass_).tpe.resultType, DEFERRED)
lazy val Any_isInstanceOf = newT1NullaryMethod(AnyClass, nme.isInstanceOf_, Final)(_ => BooleanType)
- lazy val Any_asInstanceOf = newT1NullaryMethod(AnyClass, nme.asInstanceOf_, Final)(_.typeConstructor)
+ lazy val Any_asInstanceOf = newT1NullaryMethod(AnyClass, nme.asInstanceOf_, Final)(_.typeRef)
// A type function from T => Class[U], used to determine the return
// type of getClass calls. The returned type is:
@@ -1692,7 +1692,7 @@ class Definitions(implicit ctx: Context) {
// TODO: set type bounds manually (-> MulticastDelegate), see newTypeParam
val newCaller = enterNewMethod(DelegateClass, name, paramTypes, delegateType, Final | STATIC)
// val newCaller = newPolyMethod(DelegateClass, name,
- // tparam => MethodType(paramTypes, tparam.typeConstructor)) setFlag (Final | STATIC)
+ // tparam => MethodType(paramTypes, tparam.typeRef)) setFlag (Final | STATIC)
Delegate_scalaCallers = Delegate_scalaCallers ::: List(newCaller)
nbScalaCallers += 1
newCaller
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index de4a1d8e3..2e90f3170 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -634,7 +634,7 @@ object SymDenotations {
/** The named typeref representing the type constructor for this type.
* @throws ClassCastException is this is not a type
*/
- def typeConstructor(implicit ctx: Context): TypeRef =
+ def typeRef(implicit ctx: Context): TypeRef =
if ((this is PackageClass) || owner.isTerm) symTypeRef
else TypeRef(owner.thisType, name.asTypeName).withDenot(this)
@@ -779,8 +779,8 @@ object SymDenotations {
private[this] var myTypeConstructor: TypeRef = null
- override def typeConstructor(implicit ctx: Context): TypeRef = {
- if (myTypeConstructor == null) myTypeConstructor = super.typeConstructor
+ override def typeRef(implicit ctx: Context): TypeRef = {
+ if (myTypeConstructor == null) myTypeConstructor = super.typeRef
myTypeConstructor
}
@@ -1003,7 +1003,7 @@ object SymDenotations {
ctx.debugTraceIndented(s"$tp.baseType($this)") {
if (symbol.isStatic && tp.derivesFrom(symbol))
- symbol.typeConstructor
+ symbol.typeRef
else tp match {
case tp: CachedType =>
if (baseTypeValid != ctx.runId) {
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index 7869f75b9..e18286426 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -206,7 +206,7 @@ trait Symbols { this: Context =>
/** Create a class constructor symbol for given class `cls`. */
def newConstructor(cls: ClassSymbol, flags: FlagSet, paramNames: List[TermName], paramTypes: List[Type], privateWithin: Symbol = NoSymbol, coord: Coord = NoCoord) =
- newSymbol(cls, nme.CONSTRUCTOR, flags | Method, MethodType(paramNames, paramTypes)(_ => cls.typeConstructor), privateWithin, coord)
+ newSymbol(cls, nme.CONSTRUCTOR, flags | Method, MethodType(paramNames, paramTypes)(_ => cls.typeRef), privateWithin, coord)
/** Create an empty default constructor symbol for given class `cls`. */
def newDefaultConstructor(cls: ClassSymbol) =
@@ -463,7 +463,7 @@ object Symbols {
override def superId(implicit ctx: Context): Int = {
val hint = superIdHint
- val key = this.typeConstructor
+ val key = this.typeRef
if (hint >= 0 && hint <= ctx.lastSuperId && (ctx.classOfId(hint) eq key))
hint
else {
diff --git a/src/dotty/tools/dotc/core/TypeComparer.scala b/src/dotty/tools/dotc/core/TypeComparer.scala
index b1081e433..b554e0bea 100644
--- a/src/dotty/tools/dotc/core/TypeComparer.scala
+++ b/src/dotty/tools/dotc/core/TypeComparer.scala
@@ -333,7 +333,7 @@ class TypeComparer(initctx: Context) extends DotClass {
((v > 0) || (lo2 isRef NothingClass) || isSubType(lo2, lo1)) &&
((v < 0) || (hi2 isRef AnyClass) || isSubType(hi1, hi2))
case tp1: ClassInfo =>
- val tt = tp1.typeConstructor // was typeTemplate
+ val tt = tp1.typeRef
isSubType(lo2, tt) && isSubType(tt, hi2)
case _ =>
false
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala
index c48a8e715..cdc695ebd 100644
--- a/src/dotty/tools/dotc/core/TypeOps.scala
+++ b/src/dotty/tools/dotc/core/TypeOps.scala
@@ -146,7 +146,7 @@ trait TypeOps { this: Context =>
case tp: TypeRef =>
tp
case ErrorType =>
- defn.AnyClass.typeConstructor
+ defn.AnyClass.typeRef
case _ =>
throw new TypeError(s"unexpected parent type: $tp")
}
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 916f2cdc6..5617fa6cc 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -731,7 +731,7 @@ object Types {
/** This type seen as a TypeBounds */
final def bounds(implicit ctx: Context): TypeBounds = this match {
case tp: TypeBounds => tp
- case ci: ClassInfo => TypeAlias(ci.typeConstructor)
+ case ci: ClassInfo => TypeAlias(ci.typeRef)
case wc: WildcardType =>
wc.optBounds match {
case bounds: TypeBounds => bounds
@@ -961,7 +961,7 @@ object Types {
*/
def translateParameterized(from: ClassSymbol, to: ClassSymbol)(implicit ctx: Context): Type =
if (this derivesFrom from)
- RefinedType(to.typeConstructor, to.typeParams.head.name, member(from.typeParams.head.name).info)
+ RefinedType(to.typeRef, to.typeParams.head.name, member(from.typeParams.head.name).info)
else this
/** If this is an encoding of a (partially) applied type, return its arguments,
@@ -2080,7 +2080,7 @@ object Types {
selfInfo: DotClass /* should be: Type | Symbol */) extends CachedGroundType with TypeType {
def selfType(implicit ctx: Context): Type = selfInfo match {
- case NoType => cls.typeConstructor
+ case NoType => cls.typeRef
case self: Symbol => self.info
case tp: Type => tp
}
@@ -2091,7 +2091,7 @@ object Types {
private var tyconCache: Type = null
- def typeConstructor(implicit ctx: Context): Type = {
+ def typeRef(implicit ctx: Context): Type = {
def clsDenot = if (prefix eq cls.owner.thisType) cls.denot else cls.denot.copySymDenotation(info = this)
if (tyconCache == null)
tyconCache =
@@ -2195,7 +2195,7 @@ object Types {
* @see Definitions.hkTrait
*/
def higherKinded(boundSyms: List[Symbol])(implicit ctx: Context) = {
- val parent = defn.hkTrait(boundSyms map (_.variance)).typeConstructor
+ val parent = defn.hkTrait(boundSyms map (_.variance)).typeRef
val hkParamNames = boundSyms.indices.toList map tpnme.higherKindedParamName
def substBoundSyms(tp: Type)(rt: RefinedType): Type =
tp.subst(boundSyms, hkParamNames map (TypeRef(RefinedThis(rt), _)))
@@ -2311,7 +2311,7 @@ object Types {
case _ => false
}
val noParamsNeeded = (tp.cls is Trait) || zeroParams(tp.cls.primaryConstructor.info)
- val selfTypeFeasible = tp.typeConstructor <:< tp.selfType
+ val selfTypeFeasible = tp.typeRef <:< tp.selfType
noParamsNeeded && selfTypeFeasible
case tp: RefinedType =>
isInstantiatable(tp.underlying)
diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
index a641e10cc..b68f9eb6f 100644
--- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
+++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
@@ -101,11 +101,11 @@ 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.typeConstructor }
- else pool.getSuperClass(in.nextChar).typeConstructor
+ val superType = if (isAnnotation) { in.nextChar; defn.AnnotationClass.typeRef }
+ else pool.getSuperClass(in.nextChar).typeRef
val ifaceCount = in.nextChar
- var ifaces = for (i <- List.range(0, ifaceCount)) yield pool.getSuperClass(in.nextChar).typeConstructor
- if (isAnnotation) ifaces = defn.ClassfileAnnotationClass.typeConstructor :: ifaces
+ var ifaces = for (i <- List.range(0, ifaceCount)) yield pool.getSuperClass(in.nextChar).typeRef
+ if (isAnnotation) ifaces = defn.ClassfileAnnotationClass.typeRef :: ifaces
superType :: ifaces
}
@@ -190,7 +190,7 @@ class ClassfileParser(
*/
def normalizeConstructorInfo() = {
val mt @ MethodType(paramnames, paramtypes) = denot.info
- val rt = classRoot.typeConstructor appliedTo (classRoot.typeParams map (_.symRef))
+ val rt = classRoot.typeRef appliedTo (classRoot.typeParams map (_.symRef))
denot.info = mt.derivedMethodType(paramnames, paramtypes, rt)
addConstructorTypeParams(denot)
}
@@ -283,12 +283,12 @@ class ClassfileParser(
}
val classSym = classNameToSymbol(subName(c => c == ';' || c == '<'))
- var tpe = processClassType(processInner(classSym.typeConstructor))
+ var tpe = processClassType(processInner(classSym.typeRef))
while (sig(index) == '.') {
accept('.')
val name = subName(c => c == ';' || c == '<' || c == '.').toTypeName
val clazz = tpe.member(name).symbol
- tpe = processClassType(processInner(clazz.typeConstructor))
+ tpe = processClassType(processInner(clazz.typeRef))
}
accept(';')
tpe
@@ -321,7 +321,7 @@ class ClassfileParser(
val n = subName(';'.==).toTypeName
index += 1
//assert(tparams contains n, s"classTparams = $classTParams, tparams = $tparams, key = $n")
- if (skiptvs) defn.AnyType else tparams(n).typeConstructor
+ if (skiptvs) defn.AnyType else tparams(n).typeRef
}
} // sig2type(tparams, skiptvs)
@@ -867,11 +867,11 @@ class ClassfileParser(
} else {
val sym = classNameToSymbol(name)
values(index) = sym
- c = sym.typeConstructor
+ c = sym.typeRef
}
} else c = value match {
case tp: Type => tp
- case cls: Symbol => cls.typeConstructor
+ case cls: Symbol => cls.typeRef
}
c
}
@@ -907,7 +907,7 @@ class ClassfileParser(
}
value match {
case ct: Constant => ct
- case cls: Symbol => Constant(cls.typeConstructor)
+ case cls: Symbol => Constant(cls.typeRef)
case arr: Type => Constant(arr)
}
}
diff --git a/src/dotty/tools/dotc/core/pickling/UnPickler.scala b/src/dotty/tools/dotc/core/pickling/UnPickler.scala
index 386ea3d85..02db4b0b0 100644
--- a/src/dotty/tools/dotc/core/pickling/UnPickler.scala
+++ b/src/dotty/tools/dotc/core/pickling/UnPickler.scala
@@ -781,7 +781,7 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot:
val end = readNat() + readIndex
// array elements are trees representing instances of scala.annotation.Annotation
SeqLiteral(
- defn.SeqType.appliedTo(defn.AnnotationClass.typeConstructor :: Nil),
+ defn.SeqType.appliedTo(defn.AnnotationClass.typeRef :: Nil),
until(end, () => readClassfileAnnotArg(readNat())))
}
diff --git a/src/dotty/tools/dotc/core/transform/Erasure.scala b/src/dotty/tools/dotc/core/transform/Erasure.scala
index 119400fdb..03726e4f5 100644
--- a/src/dotty/tools/dotc/core/transform/Erasure.scala
+++ b/src/dotty/tools/dotc/core/transform/Erasure.scala
@@ -37,7 +37,7 @@ object Erasure {
val sym = tp.symbol
if (sym.isClass)
/*if (sym.isDerivedValueClass) eraseDerivedValueClassRef(tref)
- else */if (sym.owner is Package) normalizeClass(sym.asClass).typeConstructor
+ else */if (sym.owner is Package) normalizeClass(sym.asClass).typeRef
else tp.derivedSelect(erasure(tp.prefix))
else erasure(tp.info)
case tp: RefinedType =>
@@ -60,7 +60,7 @@ object Erasure {
case tp @ ClassInfo(pre, cls, classParents, decls, _) =>
val parents: List[TypeRef] =
if (cls == defn.ObjectClass || cls.isPrimitiveValueClass) Nil
- else if (cls == defn.ArrayClass) defn.ObjectClass.typeConstructor :: Nil
+ else if (cls == defn.ArrayClass) defn.ObjectClass.typeRef :: Nil
else removeLaterObjects(classParents mapConserve (erasure(_).asInstanceOf[TypeRef]))
tp.derivedClassInfo(erasure(pre), parents, NoType)
case ErrorType =>