@@ -14,6 +14,7 @@ import NameKinds.UniqueName
1414import util .Spans ._
1515import collection .mutable
1616import Trees ._
17+ import Decorators ._
1718
1819/** A class that handles argument lifting. Argument lifting is needed in the following
1920 * scenarios:
@@ -47,7 +48,10 @@ abstract class Lifter {
4748 var liftedType = expr.tpe.widen
4849 if (liftedFlags.is(Method )) liftedType = ExprType (liftedType)
4950 val lifted = ctx.newSymbol(ctx.owner, name, liftedFlags | Synthetic , liftedType, coord = spanCoord(expr.span))
50- defs += liftedDef(lifted, expr).withSpan(expr.span).setDefTree
51+ defs += liftedDef(lifted, expr)
52+ .withSpan(expr.span)
53+ .changeNonLocalOwners(lifted)
54+ .setDefTree
5155 ref(lifted.termRef).withSpan(expr.span.focus)
5256 }
5357
@@ -179,7 +183,7 @@ object EtaExpansion extends LiftImpure {
179183 * If `expr` has implicit function type, the arguments are passed with `given`.
180184 * E.g. for (1):
181185 *
182- * { val xs = es; (x1, ..., xn) => expr given ( x1, ..., xn) }
186+ * { val xs = es; (x1, ..., xn) => expr( given x1, ..., xn) }
183187 *
184188 * Case (3) applies if the method is curried, i.e. its result type is again a method
185189 * type. Case (2) applies if the expected arity of the function type `xarity` differs
0 commit comments