Skip to content

Commit 97b6985

Browse files
committed
Clean up parameterized typedefs
Express them in terms PolyTypeTrees rather than having an irregular, untyped only tparams field. This is necessary if we want to pickle type trees instead of types, because now the rhs of a typedef tells the whole story, so we are not required any longer to use the info of the symbol.
1 parent f3c8fdd commit 97b6985

File tree

13 files changed

+77
-80
lines changed

13 files changed

+77
-80
lines changed

src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ object desugar {
234234
if (tdef.mods is PrivateLocalParam) {
235235
val tparam = cpy.TypeDef(tdef)(name = tdef.name.expandedName(ctx.owner))
236236
.withMods(tdef.mods &~ PrivateLocal | ExpandedName)
237-
val alias = cpy.TypeDef(tdef)(rhs = refOfDef(tparam), tparams = Nil)
237+
val alias = cpy.TypeDef(tdef)(rhs = refOfDef(tparam))
238238
.withMods(tdef.mods & VarianceFlags | PrivateLocalParamAccessor | Synthetic)
239239
Thicket(tparam, alias)
240240
}
@@ -461,8 +461,7 @@ object desugar {
461461
val vparamAccessors = derivedVparamss.flatten.map(_.withMods(originalVparams.next.mods | caseAccessor))
462462
cpy.TypeDef(cdef)(
463463
rhs = cpy.Template(impl)(constr, parents1, self1,
464-
tparamAccessors ::: vparamAccessors ::: normalizedBody ::: caseClassMeths),
465-
tparams = Nil)
464+
tparamAccessors ::: vparamAccessors ::: normalizedBody ::: caseClassMeths))
466465
}
467466

468467
// install the watch on classTycon

src/dotty/tools/dotc/ast/TreeInfo.scala

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,12 @@ trait UntypedTreeInfo extends TreeInfo[Untyped] { self: Trees.Instance[Untyped]
272272
case mdef: ValOrDefDef =>
273273
mdef.unforcedRhs == EmptyTree && !mdef.name.isConstructorName && !mdef.mods.is(ParamAccessor)
274274
case mdef: TypeDef =>
275-
mdef.rhs.isEmpty || mdef.rhs.isInstanceOf[TypeBoundsTree]
275+
def isBounds(rhs: Tree): Boolean = rhs match {
276+
case _: TypeBoundsTree => true
277+
case PolyTypeTree(_, body) => isBounds(body)
278+
case _ => false
279+
}
280+
mdef.rhs.isEmpty || isBounds(mdef.rhs)
276281
case _ => false
277282
}
278283

@@ -382,9 +387,9 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
382387
def isIdempotentRef(tree: Tree)(implicit ctx: Context) =
383388
refPurity(tree) >= Idempotent
384389

385-
/** If `tree` is a constant expression, its value as a Literal,
390+
/** If `tree` is a constant expression, its value as a Literal,
386391
* or `tree` itself otherwise.
387-
*
392+
*
388393
* Note: Demanding idempotency instead of purity in literalize is strictly speaking too loose.
389394
* Example
390395
*
@@ -410,11 +415,11 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
410415
*
411416
* Revisit this issue once we have implemented `inline`. Then we can demand
412417
* purity of the prefix unless the selection goes to an inline val.
413-
*
418+
*
414419
* Note: This method should be applied to all term tree nodes that are not literals,
415420
* that can be idempotent, and that can have constant types. So far, only nodes
416-
* of the following classes qualify:
417-
*
421+
* of the following classes qualify:
422+
*
418423
* Ident
419424
* Select
420425
* TypeApply

src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@ object Trees {
6060
with Cloneable {
6161

6262
if (Stats.enabled) ntrees += 1
63-
63+
6464
private def nxId = {
6565
nextId += 1
6666
//assert(nextId != 199, this)
67-
nextId
67+
nextId
6868
}
6969

7070
/** A unique identifier for this tree. Used for debugging, and potentially
7171
* tracking presentation compiler interactions
7272
*/
7373
private var myUniqueId: Int = nxId
74-
74+
7575
def uniqueId = myUniqueId
7676

7777
/** The type constructor at the root of the tree */
@@ -192,7 +192,7 @@ object Trees {
192192

193193
override def hashCode(): Int = uniqueId // for debugging; was: System.identityHashCode(this)
194194
override def equals(that: Any) = this eq that.asInstanceOf[AnyRef]
195-
195+
196196
override def clone: Tree[T] = {
197197
val tree = super.clone.asInstanceOf[Tree[T]]
198198
tree.myUniqueId = nxId
@@ -653,12 +653,6 @@ object Trees {
653653

654654
/** Is this a definition of a class? */
655655
def isClassDef = rhs.isInstanceOf[Template[_]]
656-
657-
/** If this a non-class type definition, its type parameters.
658-
* Can be different from Nil only for PolyTypeDefs, which are always
659-
* untyped and get eliminated during desugaring.
660-
*/
661-
def tparams: List[untpd.TypeDef] = Nil
662656
}
663657

664658
/** extends parents { self => body } */
@@ -1023,9 +1017,9 @@ object Trees {
10231017
case tree: DefDef if (name == tree.name) && (tparams eq tree.tparams) && (vparamss eq tree.vparamss) && (tpt eq tree.tpt) && (rhs eq tree.unforcedRhs) => tree
10241018
case _ => finalize(tree, untpd.DefDef(name, tparams, vparamss, tpt, rhs))
10251019
}
1026-
def TypeDef(tree: Tree)(name: TypeName, rhs: Tree, tparams: List[untpd.TypeDef]): TypeDef = tree match {
1027-
case tree: TypeDef if (name == tree.name) && (rhs eq tree.rhs) && (tparams eq tree.tparams) => tree
1028-
case _ => finalize(tree, untpd.TypeDef(name, tparams, rhs))
1020+
def TypeDef(tree: Tree)(name: TypeName, rhs: Tree): TypeDef = tree match {
1021+
case tree: TypeDef if (name == tree.name) && (rhs eq tree.rhs) => tree
1022+
case _ => finalize(tree, untpd.TypeDef(name, rhs))
10291023
}
10301024
def Template(tree: Tree)(constr: DefDef, parents: List[Tree], self: ValDef, body: LazyTreeList): Template = tree match {
10311025
case tree: Template if (constr eq tree.constr) && (parents eq tree.parents) && (self eq tree.self) && (body eq tree.unforcedBody) => tree
@@ -1064,8 +1058,8 @@ object Trees {
10641058
ValDef(tree: Tree)(name, tpt, rhs)
10651059
def DefDef(tree: DefDef)(name: TermName = tree.name, tparams: List[TypeDef] = tree.tparams, vparamss: List[List[ValDef]] = tree.vparamss, tpt: Tree = tree.tpt, rhs: LazyTree = tree.unforcedRhs): DefDef =
10661060
DefDef(tree: Tree)(name, tparams, vparamss, tpt, rhs)
1067-
def TypeDef(tree: TypeDef)(name: TypeName = tree.name, rhs: Tree = tree.rhs, tparams: List[untpd.TypeDef] = tree.tparams): TypeDef =
1068-
TypeDef(tree: Tree)(name, rhs, tparams)
1061+
def TypeDef(tree: TypeDef)(name: TypeName = tree.name, rhs: Tree = tree.rhs): TypeDef =
1062+
TypeDef(tree: Tree)(name, rhs)
10691063
def Template(tree: Template)(constr: DefDef = tree.constr, parents: List[Tree] = tree.parents, self: ValDef = tree.self, body: LazyTreeList = tree.unforcedBody): Template =
10701064
Template(tree: Tree)(constr, parents, self, body)
10711065
}
@@ -1146,7 +1140,7 @@ object Trees {
11461140
case tree @ DefDef(name, tparams, vparamss, tpt, _) =>
11471141
cpy.DefDef(tree)(name, transformSub(tparams), vparamss mapConserve (transformSub(_)), transform(tpt), transform(tree.rhs))
11481142
case tree @ TypeDef(name, rhs) =>
1149-
cpy.TypeDef(tree)(name, transform(rhs), tree.tparams)
1143+
cpy.TypeDef(tree)(name, transform(rhs))
11501144
case tree @ Template(constr, parents, self, _) =>
11511145
cpy.Template(tree)(transformSub(constr), transform(parents), transformSub(self), transformStats(tree.body))
11521146
case Import(expr, selectors) =>
@@ -1294,7 +1288,6 @@ object Trees {
12941288
case tree: Bind => cpy.Bind(tree)(newName, tree.body)
12951289
case tree: ValDef => cpy.ValDef(tree)(name = newName.asTermName)
12961290
case tree: DefDef => cpy.DefDef(tree)(name = newName.asTermName)
1297-
case tree: untpd.PolyTypeDef => untpd.cpy.PolyTypeDef(tree)(newName.asTypeName, tree.tparams, tree.rhs).withMods(tree.rawMods)
12981291
case tree: TypeDef => cpy.TypeDef(tree)(name = newName.asTypeName)
12991292
}
13001293
}.asInstanceOf[tree.ThisTree[T]]

src/dotty/tools/dotc/ast/untpd.scala

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
8080
case class ContextBounds(bounds: TypeBoundsTree, cxBounds: List[Tree]) extends TypTree
8181
case class PatDef(mods: Modifiers, pats: List[Tree], tpt: Tree, rhs: Tree) extends DefTree
8282

83-
class PolyTypeDef(name: TypeName, override val tparams: List[TypeDef], rhs: Tree)
84-
extends TypeDef(name, rhs)
85-
8683
/** A block arising from a right-associative infix operation, where, e.g.
8784
*
8885
* a +: b
@@ -310,9 +307,6 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
310307

311308
def TypeTree(tpe: Type)(implicit ctx: Context): TypedSplice = TypedSplice(TypeTree().withTypeUnchecked(tpe))
312309

313-
def TypeDef(name: TypeName, tparams: List[TypeDef], rhs: Tree): TypeDef =
314-
if (tparams.isEmpty) TypeDef(name, rhs) else new PolyTypeDef(name, tparams, rhs)
315-
316310
def unitLiteral = Literal(Constant(()))
317311

318312
def ref(tp: NamedType)(implicit ctx: Context): Tree =
@@ -348,6 +342,9 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
348342
def makeSyntheticParameter(n: Int = 1, tpt: Tree = TypeTree())(implicit ctx: Context): ValDef =
349343
ValDef(nme.syntheticParamName(n), tpt, EmptyTree).withFlags(SyntheticTermParam)
350344

345+
def lambdaAbstract(tparams: List[TypeDef], tpt: Tree)(implicit ctx: Context) =
346+
if (tparams.isEmpty) tpt else PolyTypeTree(tparams, tpt)
347+
351348
/** A reference to given definition. If definition is a repeated
352349
* parameter, the reference will be a repeated argument.
353350
*/
@@ -392,10 +389,6 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
392389
if (expr eq tree.expr) && (handler eq tree.handler) && (finalizer eq tree.finalizer) => tree
393390
case _ => untpd.ParsedTry(expr, handler, finalizer).withPos(tree.pos)
394391
}
395-
def PolyTypeDef(tree: Tree)(name: TypeName, tparams: List[TypeDef], rhs: Tree) = tree match {
396-
case tree: PolyTypeDef if (name eq tree.name) && (tparams eq tree.tparams) && (rhs eq tree.rhs) => tree
397-
case _ => new PolyTypeDef(name, tparams, rhs).withPos(tree.pos)
398-
}
399392
def SymbolLit(tree: Tree)(str: String) = tree match {
400393
case tree: SymbolLit if str == tree.str => tree
401394
case _ => untpd.SymbolLit(str).withPos(tree.pos)
@@ -506,8 +499,6 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
506499
cpy.ContextBounds(tree)(transformSub(bounds), transform(cxBounds))
507500
case PatDef(mods, pats, tpt, rhs) =>
508501
cpy.PatDef(tree)(mods, transform(pats), transform(tpt), transform(rhs))
509-
case tree: PolyTypeDef =>
510-
cpy.PolyTypeDef(tree)(tree.name, transformSub(tree.tparams), transform(tree.rhs))
511502
case _ =>
512503
super.transform(tree)
513504
}
@@ -553,8 +544,6 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
553544
this(this(x, bounds), cxBounds)
554545
case PatDef(mods, pats, tpt, rhs) =>
555546
this(this(this(x, pats), tpt), rhs)
556-
case tree: PolyTypeDef =>
557-
this(this(x, tree.tparams), tree.rhs)
558547
case TypedSplice(tree) =>
559548
this(x, tree)
560549
case _ =>
@@ -566,10 +555,4 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
566555
class UntypedDeepFolder[X](f: (X, Tree) => X) extends UntypedTreeAccumulator[X] {
567556
def apply(x: X, tree: Tree)(implicit ctx: Context): X = foldOver(f(x, tree), tree)
568557
}
569-
570-
override def rename(tree: NameTree, newName: Name)(implicit ctx: Context): tree.ThisTree[Untyped] = tree match {
571-
case t: PolyTypeDef =>
572-
cpy.PolyTypeDef(t)(newName.asTypeName, t.tparams, t.rhs).asInstanceOf[tree.ThisTree[Untyped]]
573-
case _ => super.rename(tree, newName)
574-
}
575558
}

src/dotty/tools/dotc/core/tasty/TreePickler.scala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ class TreePickler(pickler: TastyPickler) {
4949
case None =>
5050
}
5151
}
52-
53-
def rhs(tdef: TypeDef)(implicit ctx: Context) =
54-
if (tdef.symbol.isClass) tdef.rhs
55-
else TypeTree(tdef.symbol.info).withPos(tdef.rhs.pos)
5652

5753
private def pickleName(name: Name): Unit = writeNat(nameIndex(name).index)
5854
private def pickleName(name: TastyName): Unit = writeNat(nameIndex(name).index)
@@ -336,7 +332,7 @@ class TreePickler(pickler: TastyPickler) {
336332
tree match {
337333
case tree: ValDef => pickleDef(PARAM, tree.symbol, tree.tpt)
338334
case tree: DefDef => pickleDef(PARAM, tree.symbol, tree.tpt, tree.rhs)
339-
case tree: TypeDef => pickleDef(TYPEPARAM, tree.symbol, rhs(tree))
335+
case tree: TypeDef => pickleDef(TYPEPARAM, tree.symbol, tree.rhs)
340336
}
341337
}
342338

@@ -478,7 +474,7 @@ class TreePickler(pickler: TastyPickler) {
478474
}
479475
pickleDef(DEFDEF, tree.symbol, tree.tpt, tree.rhs, pickleAllParams)
480476
case tree: TypeDef =>
481-
pickleDef(TYPEDEF, tree.symbol, rhs(tree))
477+
pickleDef(TYPEDEF, tree.symbol, tree.rhs)
482478
case tree: Template =>
483479
registerDef(tree.symbol)
484480
writeByte(TEMPLATE)

src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,10 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table, posUnpickle
696696
TypeDef(readTemplate(localCtx))
697697
} else {
698698
val rhs = readTpt()
699-
sym.info = rhs.tpe
699+
sym.info = rhs.tpe match {
700+
case _: TypeBounds | _: ClassInfo => rhs.tpe
701+
case _ => TypeAlias(rhs.tpe, sym.variance)
702+
}
700703
TypeDef(rhs)
701704
}
702705
case PARAM =>

src/dotty/tools/dotc/parsing/JavaParsers.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ object JavaParsers {
417417
atPos(in.offset) {
418418
val name = identForType()
419419
val hi = if (in.token == EXTENDS) { in.nextToken() ; bound() } else EmptyTree
420-
TypeDef(name, Nil, TypeBoundsTree(EmptyTree, hi)).withMods(Modifiers(flags))
420+
TypeDef(name, TypeBoundsTree(EmptyTree, hi)).withMods(Modifiers(flags))
421421
}
422422

423423
def bound(): Tree =
@@ -625,8 +625,7 @@ object JavaParsers {
625625
val template = cdef.rhs.asInstanceOf[Template]
626626
cpy.TypeDef(cdef)(cdef.name,
627627
cpy.Template(template)(template.constr, template.parents, template.self,
628-
importCompanionObject(cdef) :: template.body),
629-
cdef.tparams).withMods(cdef.mods)
628+
importCompanionObject(cdef) :: template.body)).withMods(cdef.mods)
630629
}
631630

632631
List(makeCompanionObject(cdefNew, statics), cdefNew)
@@ -715,7 +714,7 @@ object JavaParsers {
715714
val (statics, body) = typeBody(INTERFACE, name, tparams)
716715
val iface = atPos(start, nameOffset) {
717716
TypeDef(
718-
name, tparams,
717+
name,
719718
makeTemplate(parents, body, tparams, false)).withMods(mods | Flags.Trait | Flags.JavaInterface | Flags.Abstract)
720719
}
721720
addCompanionObject(statics, iface)
@@ -830,7 +829,7 @@ object JavaParsers {
830829
Select(New(javaLangDot(tpnme.Enum)), nme.CONSTRUCTOR), List(enumType)),
831830
List(Literal(Constant(null)),Literal(Constant(0))))
832831
val enum = atPos(start, nameOffset) {
833-
TypeDef(name, List(),
832+
TypeDef(name,
834833
makeTemplate(superclazz :: interfaces, body, List(), true)).withMods(mods | Flags.Enum)
835834
}
836835
addCompanionObject(consts ::: statics ::: predefs, enum)

src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,7 +1646,7 @@ object Parsers {
16461646
val bounds =
16471647
if (isConcreteOwner) typeParamBounds(name)
16481648
else typeBounds()
1649-
TypeDef(name, hkparams, bounds).withMods(mods)
1649+
TypeDef(name, lambdaAbstract(hkparams, bounds)).withMods(mods)
16501650
}
16511651
}
16521652
commaSeparated(typeParam)
@@ -1956,9 +1956,9 @@ object Parsers {
19561956
in.token match {
19571957
case EQUALS =>
19581958
in.nextToken()
1959-
TypeDef(name, tparams, typ()).withMods(mods).setComment(docstring)
1959+
TypeDef(name, lambdaAbstract(tparams, typ())).withMods(mods).setComment(docstring)
19601960
case SUPERTYPE | SUBTYPE | SEMI | NEWLINE | NEWLINES | COMMA | RBRACE | EOF =>
1961-
TypeDef(name, tparams, typeBounds()).withMods(mods).setComment(docstring)
1961+
TypeDef(name, lambdaAbstract(tparams, typeBounds())).withMods(mods).setComment(docstring)
19621962
case _ =>
19631963
syntaxErrorOrIncomplete("`=', `>:', or `<:' expected")
19641964
EmptyTree

src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
351351
case SeqLiteral(elems, elemtpt) =>
352352
"[" ~ toTextGlobal(elems, ",") ~ " : " ~ toText(elemtpt) ~ "]"
353353
case tree @ Inlined(call, bindings, body) =>
354-
(("/* inlined from " ~ toText(call) ~ "*/ ") provided !homogenizedView) ~
354+
(("/* inlined from " ~ toText(call) ~ "*/ ") provided !homogenizedView) ~
355355
blockText(bindings :+ body)
356356
case tpt: untpd.DerivedTypeTree =>
357357
"<derived typetree watching " ~ summarized(toText(tpt.watched)) ~ ">"
@@ -402,24 +402,27 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
402402
}
403403
}
404404
case tree @ TypeDef(name, rhs) =>
405-
def typeDefText(rhsText: Text) =
405+
def typeDefText(tparamsText: => Text, rhsText: => Text) =
406406
dclTextOr {
407407
modText(tree.mods, "type") ~~ (varianceText(tree.mods) ~ nameIdText(tree)) ~
408408
withEnclosingDef(tree) {
409-
val rhsText1 = if (tree.hasType) toText(tree.symbol.info) else rhsText
410-
tparamsText(tree.tparams) ~ rhsText1
409+
if (tree.hasType) toText(tree.symbol.info) // TODO: always print RHS, once we pickle/unpickle type trees
410+
else tparamsText ~ rhsText
411411
}
412412
}
413-
rhs match {
413+
def recur(rhs: Tree, tparamsTxt: => Text): Text = rhs match {
414414
case impl: Template =>
415415
modText(tree.mods, if ((tree).mods is Trait) "trait" else "class") ~~
416416
nameIdText(tree) ~ withEnclosingDef(tree) { toTextTemplate(impl) } ~
417417
(if (tree.hasType && ctx.settings.verbose.value) i"[decls = ${tree.symbol.info.decls}]" else "")
418418
case rhs: TypeBoundsTree =>
419-
typeDefText(toText(rhs))
420-
case _ =>
421-
typeDefText(optText(rhs)(" = " ~ _))
419+
typeDefText(tparamsTxt, toText(rhs))
420+
case PolyTypeTree(tparams, body) =>
421+
recur(body, tparamsText(tparams))
422+
case rhs =>
423+
typeDefText(tparamsTxt, optText(rhs)(" = " ~ _))
422424
}
425+
recur(rhs, "")
423426
case Import(expr, selectors) =>
424427
def selectorText(sel: Tree): Text = sel match {
425428
case Thicket(l :: r :: Nil) => toTextGlobal(l) ~ " => " ~ toTextGlobal(r)
@@ -525,11 +528,11 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
525528
if (tree.isType) txt = toText(tp)
526529
else if (!tree.isDef) txt = ("<" ~ txt ~ ":" ~ toText(tp) ~ ">").close
527530
}
528-
else if (homogenizedView && tree.isType)
531+
else if (homogenizedView && tree.isType)
529532
txt = toText(tree.typeOpt)
530533
if (ctx.settings.Yprintpos.value && !tree.isInstanceOf[WithoutTypeOrPos[_]]) {
531-
val pos =
532-
if (homogenizedView && !tree.isInstanceOf[MemberDef]) tree.pos.toSynthetic
534+
val pos =
535+
if (homogenizedView && !tree.isInstanceOf[MemberDef]) tree.pos.toSynthetic
533536
else tree.pos
534537
val clsStr = "" // DEBUG: if (tree.isType) tree.getClass.toString else ""
535538
txt = (txt ~ "@" ~ pos.toString ~ clsStr).close

src/dotty/tools/dotc/transform/TreeTransform.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ object TreeTransforms {
977977
if (mutatedInfo eq null) tree
978978
else {
979979
val rhs = transform(tree.rhs, mutatedInfo, cur)(localContext(tree.symbol))
980-
goTypeDef(cpy.TypeDef(tree)(tree.name, rhs, tree.tparams), mutatedInfo.nx.nxTransTypeDef(cur))
980+
goTypeDef(cpy.TypeDef(tree)(tree.name, rhs), mutatedInfo.nx.nxTransTypeDef(cur))
981981
}
982982
case _ =>
983983
tree

0 commit comments

Comments
 (0)