File tree 1 file changed +5
-0
lines changed
compiler/src/dotty/tools/dotc/transform
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import Symbols.*
15
15
import Decorators .*
16
16
import DenotTransformers .*
17
17
import collection .mutable
18
+ import Types .*
18
19
19
20
object Constructors {
20
21
val name : String = " constructors"
@@ -197,6 +198,10 @@ class Constructors extends MiniPhase with IdentityDenotTransformer { thisPhase =
197
198
) &&
198
199
fn.symbol.info.resultType.classSymbol == outerParam.info.classSymbol =>
199
200
ref(outerParam)
201
+ case Assign (lhs, rhs) if lhs.symbol.name == nme.OUTER => // not transform LHS of assignment to $outer field
202
+ cpy.Assign (tree)(lhs, super .transform(rhs))
203
+ case dd : DefDef if dd.name.endsWith(nme.OUTER .asSimpleName) => // not transform RHS of outer accessor
204
+ dd
200
205
case tree : RefTree if tree.symbol.is(ParamAccessor ) && tree.symbol.name == nme.OUTER =>
201
206
ref(outerParam)
202
207
case _ =>
You can’t perform that action at this time.
0 commit comments