@@ -118,6 +118,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
118
118
case class ContextBounds (bounds : TypeBoundsTree , cxBounds : List [Tree ])(implicit @ constructorOnly src : SourceFile ) extends TypTree
119
119
case class PatDef (mods : Modifiers , pats : List [Tree ], tpt : Tree , rhs : Tree )(implicit @ constructorOnly src : SourceFile ) extends DefTree
120
120
case class ExtMethods (paramss : List [ParamClause ], methods : List [Tree ])(implicit @ constructorOnly src : SourceFile ) extends Tree
121
+ case class ContextBoundTypeTree (tycon : Tree , paramName : TypeName , ownName : TermName )(implicit @ constructorOnly src : SourceFile ) extends Tree
121
122
case class MacroTree (expr : Tree )(implicit @ constructorOnly src : SourceFile ) extends Tree
122
123
123
124
case class ImportSelector (imported : Ident , renamed : Tree = EmptyTree , bound : Tree = EmptyTree )(implicit @ constructorOnly src : SourceFile ) extends Tree {
@@ -677,6 +678,9 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
677
678
def ExtMethods (tree : Tree )(paramss : List [ParamClause ], methods : List [Tree ])(using Context ): Tree = tree match
678
679
case tree : ExtMethods if (paramss eq tree.paramss) && (methods == tree.methods) => tree
679
680
case _ => finalize(tree, untpd.ExtMethods (paramss, methods)(tree.source))
681
+ def ContextBoundTypeTree (tree : Tree )(tycon : Tree , paramName : TypeName , ownName : TermName )(using Context ): Tree = tree match
682
+ case tree : ContextBoundTypeTree if (tycon eq tree.tycon) && paramName == tree.paramName && ownName == tree.ownName => tree
683
+ case _ => finalize(tree, untpd.ContextBoundTypeTree (tycon, paramName, ownName)(tree.source))
680
684
def ImportSelector (tree : Tree )(imported : Ident , renamed : Tree , bound : Tree )(using Context ): Tree = tree match {
681
685
case tree : ImportSelector if (imported eq tree.imported) && (renamed eq tree.renamed) && (bound eq tree.bound) => tree
682
686
case _ => finalize(tree, untpd.ImportSelector (imported, renamed, bound)(tree.source))
@@ -742,6 +746,8 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
742
746
cpy.PatDef (tree)(mods, transform(pats), transform(tpt), transform(rhs))
743
747
case ExtMethods (paramss, methods) =>
744
748
cpy.ExtMethods (tree)(transformParamss(paramss), transformSub(methods))
749
+ case ContextBoundTypeTree (tycon, paramName, ownName) =>
750
+ cpy.ContextBoundTypeTree (tree)(transform(tycon), paramName, ownName)
745
751
case ImportSelector (imported, renamed, bound) =>
746
752
cpy.ImportSelector (tree)(transformSub(imported), transform(renamed), transform(bound))
747
753
case Number (_, _) | TypedSplice (_) =>
@@ -797,6 +803,8 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
797
803
this (this (this (x, pats), tpt), rhs)
798
804
case ExtMethods (paramss, methods) =>
799
805
this (paramss.foldLeft(x)(apply), methods)
806
+ case ContextBoundTypeTree (tycon, paramName, ownName) =>
807
+ this (x, tycon)
800
808
case ImportSelector (imported, renamed, bound) =>
801
809
this (this (this (x, imported), renamed), bound)
802
810
case Number (_, _) =>
0 commit comments