@@ -95,9 +95,9 @@ class Constructors extends MiniPhaseTransform with SymTransformer { thisTransfor
95
95
if (noDirectRefsFrom(tree)) tree else super .transform(tree)
96
96
}
97
97
98
- def apply (tree : Tree , inSuperCall : Boolean = false )(implicit ctx : Context ): Tree = {
98
+ def apply (tree : Tree , prevOwner : Symbol , inSuperCall : Boolean = false )(implicit ctx : Context ): Tree = {
99
99
this .excluded = if (inSuperCall) EmptyFlags else Mutable
100
- transform(tree)
100
+ transform(tree).changeOwnerAfter(prevOwner, constr.symbol, thisTransform)
101
101
}
102
102
}
103
103
@@ -153,19 +153,19 @@ class Constructors extends MiniPhaseTransform with SymTransformer { thisTransfor
153
153
val sym = stat.symbol
154
154
if (isRetained(sym)) {
155
155
if (! stat.rhs.isEmpty && ! isWildcardArg(stat.rhs))
156
- constrStats += Assign (ref(sym), intoConstr(stat.rhs)).withPos(stat.pos)
156
+ constrStats += Assign (ref(sym), intoConstr(stat.rhs, sym )).withPos(stat.pos)
157
157
clsStats += cpy.ValDef (stat)(rhs = EmptyTree )
158
158
}
159
159
else if (! stat.rhs.isEmpty) {
160
160
sym.copySymDenotation(
161
161
initFlags = sym.flags &~ Private ,
162
162
owner = constr.symbol).installAfter(thisTransform)
163
- constrStats += intoConstr(stat)
163
+ constrStats += intoConstr(stat, sym )
164
164
}
165
165
case _ : DefTree =>
166
166
clsStats += stat
167
167
case _ =>
168
- constrStats += intoConstr(stat)
168
+ constrStats += intoConstr(stat, tree.symbol )
169
169
}
170
170
splitStats(stats1)
171
171
case Nil =>
0 commit comments