diff options
Diffstat (limited to 'src/dotty/tools/dotc/ast')
-rw-r--r-- | src/dotty/tools/dotc/ast/Desugar.scala | 12 | ||||
-rw-r--r-- | src/dotty/tools/dotc/ast/TreeInfo.scala | 2 | ||||
-rw-r--r-- | src/dotty/tools/dotc/ast/TypedTrees.scala | 8 | ||||
-rw-r--r-- | src/dotty/tools/dotc/ast/UntypedTrees.scala | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/dotty/tools/dotc/ast/Desugar.scala b/src/dotty/tools/dotc/ast/Desugar.scala index cbac66b6b..62f02dc82 100644 --- a/src/dotty/tools/dotc/ast/Desugar.scala +++ b/src/dotty/tools/dotc/ast/Desugar.scala @@ -175,7 +175,7 @@ object desugar { } else Nil - def anyRef = ref(defn.AnyRefAlias.typeConstructor) + def anyRef = ref(defn.AnyRefAlias.typeRef) def parentConstr(tpt: Tree) = Select(New(tpt), nme.CONSTRUCTOR) val parents1 = if (parents.isEmpty) parentConstr(anyRef) :: Nil else parents @@ -314,7 +314,7 @@ object desugar { } def makeAnnotated(cls: Symbol, tree: Tree)(implicit ctx: Context) = - Annotated(TypedSplice(tpd.New(cls.typeConstructor)), tree) + Annotated(TypedSplice(tpd.New(cls.typeRef)), tree) private def derivedValDef(mods: Modifiers, named: NameTree, tpt: Tree, rhs: Tree) = ValDef(mods, named.name.asTermName, tpt, rhs).withPos(named.pos) @@ -509,7 +509,7 @@ object desugar { // begin desugar tree match { case SymbolLit(str) => - New(ref(defn.SymbolClass.typeConstructor), (Literal(Constant(str)) :: Nil) :: Nil) + New(ref(defn.SymbolClass.typeRef), (Literal(Constant(str)) :: Nil) :: Nil) case InterpolatedString(id, strs, elems) => Apply(Select(Apply(Ident(nme.StringContext), strs), id), elems) case InfixOp(l, op, r) => @@ -528,7 +528,7 @@ object desugar { } case PrefixOp(op, t) => if ((ctx.mode is Mode.Type) && op == nme.ARROWkw) - AppliedTypeTree(ref(defn.ByNameParamClass.typeConstructor), t) + AppliedTypeTree(ref(defn.ByNameParamClass.typeRef), t) else Select(t, nme.UNARY_PREFIX ++ op) case Parens(t) => @@ -536,7 +536,7 @@ object desugar { case Tuple(ts) => if (unboxedPairs) { def PairTypeTree(l: Tree, r: Tree) = - AppliedTypeTree(ref(defn.PairClass.typeConstructor), l :: r :: Nil) + AppliedTypeTree(ref(defn.PairClass.typeRef), l :: r :: Nil) if (ctx.mode is Mode.Type) ts.reduceRight(PairTypeTree) else if (ts.isEmpty) unitLiteral else ts.reduceRight(Pair(_, _)) @@ -549,7 +549,7 @@ object desugar { unitLiteral } else if (arity == 1) ts.head - else if (ctx.mode is Mode.Type) AppliedTypeTree(ref(tupleClass.typeConstructor), ts) + else if (ctx.mode is Mode.Type) AppliedTypeTree(ref(tupleClass.typeRef), ts) else if (arity == 0) unitLiteral else Apply(ref(tupleClass.companionModule.symRef), ts) } diff --git a/src/dotty/tools/dotc/ast/TreeInfo.scala b/src/dotty/tools/dotc/ast/TreeInfo.scala index 60344267f..ed9b1b81a 100644 --- a/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -224,7 +224,7 @@ trait TreeInfo[T >: Untyped] { self: Trees.Instance[T] => /** Does this CaseDef catch Throwable? */ def catchesThrowable(cdef: CaseDef)(implicit ctx: Context) = - catchesAllOf(cdef, defn.ThrowableClass.typeConstructor) + catchesAllOf(cdef, defn.ThrowableClass.typeRef) /** Does this CaseDef catch everything of a certain Type? */ def catchesAllOf(cdef: CaseDef, threshold: Type)(implicit ctx: Context) = diff --git a/src/dotty/tools/dotc/ast/TypedTrees.scala b/src/dotty/tools/dotc/ast/TypedTrees.scala index 8a966696f..315796c65 100644 --- a/src/dotty/tools/dotc/ast/TypedTrees.scala +++ b/src/dotty/tools/dotc/ast/TypedTrees.scala @@ -148,7 +148,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { def SeqLiteral(elems: List[Tree])(implicit ctx: Context): SeqLiteral = untpd.SeqLiteral(elems) - .withType(defn.SeqClass.typeConstructor.appliedTo(ctx.typeComparer.lub(elems.tpes))) + .withType(defn.SeqClass.typeRef.appliedTo(ctx.typeComparer.lub(elems.tpes))) .checked def SeqLiteral(tpe: Type, elems: List[Tree])(implicit ctx: Context): SeqLiteral = { @@ -160,7 +160,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { def JavaSeqLiteral(elems: List[Tree])(implicit ctx: Context): SeqLiteral = new untpd.JavaSeqLiteral(elems) - .withType(defn.ArrayClass.typeConstructor.appliedTo(ctx.typeComparer.lub(elems.tpes))) + .withType(defn.ArrayClass.typeRef.appliedTo(ctx.typeComparer.lub(elems.tpes))) .checked def TypeTree(original: Tree)(implicit ctx: Context): TypeTree = @@ -225,7 +225,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { val (tparams, mtp) = sym.info match { case tp: PolyType => val tparams = ctx.newTypeParams(sym, tp.paramNames, EmptyFlags, tp.instantiateBounds) - (tparams, tp.instantiate(tparams map (_.typeConstructor))) + (tparams, tp.instantiate(tparams map (_.typeRef))) case tp => (Nil, tp) } @@ -346,7 +346,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { val modcls = sym.moduleClass.asClass val constr = DefDef(modcls.primaryConstructor.asTerm, EmptyTree) val clsdef = ClassDef(modcls, constr, body) - val valdef = ValDef(sym, New(modcls.typeConstructor)) + val valdef = ValDef(sym, New(modcls.typeRef)) Thicket(valdef, clsdef) } diff --git a/src/dotty/tools/dotc/ast/UntypedTrees.scala b/src/dotty/tools/dotc/ast/UntypedTrees.scala index c5a41661e..774f24394 100644 --- a/src/dotty/tools/dotc/ast/UntypedTrees.scala +++ b/src/dotty/tools/dotc/ast/UntypedTrees.scala @@ -120,7 +120,7 @@ object untpd extends Trees.Instance[Untyped] with TreeInfo[Untyped] { def ref(tp: NamedType)(implicit ctx: Context): Tree = TypedSplice(tpd.ref(tp)) - def scalaUnit(implicit ctx: Context) = ref(defn.UnitClass.typeConstructor) + def scalaUnit(implicit ctx: Context) = ref(defn.UnitClass.typeRef) def makeConstructor(mods: Modifiers, tparams: List[TypeDef], vparamss: List[List[ValDef]], rhs: Tree = EmptyTree)(implicit ctx: Context): DefDef = DefDef(mods, nme.CONSTRUCTOR, tparams, vparamss, TypeTree(), rhs) |