Skip to content

Commit 09279ff

Browse files
committed
Make outer references Java-synthetic
Fixes #14083 I verified manually that the puter accessors are now ACC_SYNHETIC. If someone wants to add a bytecode test, this would be good. I don't know how to make one.
1 parent d6fe4b4 commit 09279ff

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ object ExplicitOuter {
177177
else prefix.widen)
178178
val info = if (flags.is(Method)) ExprType(target) else target
179179
atPhaseNoEarlier(explicitOuterPhase.next) { // outer accessors are entered at explicitOuter + 1, should not be defined before.
180-
newSymbol(owner, name, Synthetic | flags, info, coord = cls.coord)
180+
newSymbol(owner, name, SyntheticArtifact | flags, info, coord = cls.coord)
181181
}
182182
}
183183

tests/pos/i14083.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Outer {
2+
class Inner
3+
}

0 commit comments

Comments
 (0)