@@ -914,7 +914,7 @@ object Trees {
914914
915915 /** A class for copying trees. The copy methods avid creating a new tree
916916 * If all arguments stay the same.
917-
917+ *
918918 * Note: Some of the copy methods take a context.
919919 * These are exactly those methods that are overridden in TypedTreeCopier
920920 * so that they selectively retype themselves. Retyping needs a context.
@@ -948,35 +948,35 @@ object Trees {
948948 case tree : Super if (qual eq tree.qual) && (mix == tree.mix) => tree
949949 case _ => finalize(tree, untpd.Super (qual, mix))
950950 }
951- def Apply (tree : Tree )(fun : Tree , args : List [Tree ]): Apply = tree match {
951+ def Apply (tree : Tree )(fun : Tree , args : List [Tree ])( implicit ctx : Context ) : Apply = tree match {
952952 case tree : Apply if (fun eq tree.fun) && (args eq tree.args) => tree
953953 case _ => finalize(tree, untpd.Apply (fun, args))
954954 }
955- def TypeApply (tree : Tree )(fun : Tree , args : List [Tree ]): TypeApply = tree match {
955+ def TypeApply (tree : Tree )(fun : Tree , args : List [Tree ])( implicit ctx : Context ) : TypeApply = tree match {
956956 case tree : TypeApply if (fun eq tree.fun) && (args eq tree.args) => tree
957957 case _ => finalize(tree, untpd.TypeApply (fun, args))
958958 }
959- def Literal (tree : Tree )(const : Constant ): Literal = tree match {
959+ def Literal (tree : Tree )(const : Constant )( implicit ctx : Context ) : Literal = tree match {
960960 case tree : Literal if (const == tree.const) => tree
961961 case _ => finalize(tree, untpd.Literal (const))
962962 }
963- def New (tree : Tree )(tpt : Tree ): New = tree match {
963+ def New (tree : Tree )(tpt : Tree )( implicit ctx : Context ) : New = tree match {
964964 case tree : New if (tpt eq tree.tpt) => tree
965965 case _ => finalize(tree, untpd.New (tpt))
966966 }
967967 def Pair (tree : Tree )(left : Tree , right : Tree )(implicit ctx : Context ): Pair = tree match {
968968 case tree : Pair if (left eq tree.left) && (right eq tree.right) => tree
969969 case _ => finalize(tree, untpd.Pair (left, right))
970970 }
971- def Typed (tree : Tree )(expr : Tree , tpt : Tree ): Typed = tree match {
971+ def Typed (tree : Tree )(expr : Tree , tpt : Tree )( implicit ctx : Context ) : Typed = tree match {
972972 case tree : Typed if (expr eq tree.expr) && (tpt eq tree.tpt) => tree
973973 case _ => finalize(tree, untpd.Typed (expr, tpt))
974974 }
975- def NamedArg (tree : Tree )(name : Name , arg : Tree ): NamedArg = tree match {
975+ def NamedArg (tree : Tree )(name : Name , arg : Tree )( implicit ctx : Context ) : NamedArg = tree match {
976976 case tree : NamedArg if (name == tree.name) && (arg eq tree.arg) => tree
977977 case _ => finalize(tree, untpd.NamedArg (name, arg))
978978 }
979- def Assign (tree : Tree )(lhs : Tree , rhs : Tree ): Assign = tree match {
979+ def Assign (tree : Tree )(lhs : Tree , rhs : Tree )( implicit ctx : Context ) : Assign = tree match {
980980 case tree : Assign if (lhs eq tree.lhs) && (rhs eq tree.rhs) => tree
981981 case _ => finalize(tree, untpd.Assign (lhs, rhs))
982982 }
@@ -988,7 +988,7 @@ object Trees {
988988 case tree : If if (cond eq tree.cond) && (thenp eq tree.thenp) && (elsep eq tree.elsep) => tree
989989 case _ => finalize(tree, untpd.If (cond, thenp, elsep))
990990 }
991- def Closure (tree : Tree )(env : List [Tree ], meth : Tree , tpt : Tree ): Closure = tree match {
991+ def Closure (tree : Tree )(env : List [Tree ], meth : Tree , tpt : Tree )( implicit ctx : Context ) : Closure = tree match {
992992 case tree : Closure if (env eq tree.env) && (meth eq tree.meth) && (tpt eq tree.tpt) => tree
993993 case _ => finalize(tree, untpd.Closure (env, meth, tpt))
994994 }
@@ -1000,15 +1000,15 @@ object Trees {
10001000 case tree : CaseDef if (pat eq tree.pat) && (guard eq tree.guard) && (body eq tree.body) => tree
10011001 case _ => finalize(tree, untpd.CaseDef (pat, guard, body))
10021002 }
1003- def Return (tree : Tree )(expr : Tree , from : Tree ): Return = tree match {
1003+ def Return (tree : Tree )(expr : Tree , from : Tree )( implicit ctx : Context ) : Return = tree match {
10041004 case tree : Return if (expr eq tree.expr) && (from eq tree.from) => tree
10051005 case _ => finalize(tree, untpd.Return (expr, from))
10061006 }
10071007 def Try (tree : Tree )(expr : Tree , handler : Tree , finalizer : Tree )(implicit ctx : Context ): Try = tree match {
10081008 case tree : Try if (expr eq tree.expr) && (handler eq tree.handler) && (finalizer eq tree.finalizer) => tree
10091009 case _ => finalize(tree, untpd.Try (expr, handler, finalizer))
10101010 }
1011- def Throw (tree : Tree )(expr : Tree ): Throw = tree match {
1011+ def Throw (tree : Tree )(expr : Tree )( implicit ctx : Context ) : Throw = tree match {
10121012 case tree : Throw if (expr eq tree.expr) => tree
10131013 case _ => finalize(tree, untpd.Throw (expr))
10141014 }
@@ -1104,7 +1104,7 @@ object Trees {
11041104 // is of the same class as the copy. We only include trees with more than 2 elements here.
11051105 def If (tree : If )(cond : Tree = tree.cond, thenp : Tree = tree.thenp, elsep : Tree = tree.elsep)(implicit ctx : Context ): If =
11061106 If (tree : Tree )(cond, thenp, elsep)
1107- def Closure (tree : Closure )(env : List [Tree ] = tree.env, meth : Tree = tree.meth, tpt : Tree = tree.tpt): Closure =
1107+ def Closure (tree : Closure )(env : List [Tree ] = tree.env, meth : Tree = tree.meth, tpt : Tree = tree.tpt)( implicit ctx : Context ) : Closure =
11081108 Closure (tree : Tree )(env, meth, tpt)
11091109 def CaseDef (tree : CaseDef )(pat : Tree = tree.pat, guard : Tree = tree.guard, body : Tree = tree.body)(implicit ctx : Context ): CaseDef =
11101110 CaseDef (tree : Tree )(pat, guard, body)
0 commit comments