Skip to content

Commit ea2f867

Browse files
Merge pull request #9269 from dotty-staging/fix-#9267
Fix #9267: Avoid accessing inexistent next phase
2 parents baba3f0 + ea26264 commit ea2f867

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Bridges(root: ClassSymbol, thisPhase: DenotTransformer)(implicit ctx: Cont
1616

1717
assert(ctx.phase == ctx.erasurePhase.next)
1818
private val preErasureCtx = ctx.withPhase(ctx.erasurePhase)
19-
private val elimErasedCtx = ctx.withPhase(ctx.elimErasedValueTypePhase.next)
19+
private lazy val elimErasedCtx = ctx.withPhase(ctx.elimErasedValueTypePhase.next)
2020

2121
private class BridgesCursor(implicit ctx: Context) extends OverridingPairs.Cursor(root) {
2222

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class CompilationTests extends ParallelTesting {
6565
compileFile("tests/run/i5606.scala", defaultOptions.and("-Yretain-trees")),
6666
compileFile("tests/pos-custom-args/i5498-postfixOps.scala", defaultOptions withoutLanguageFeature "postfixOps"),
6767
compileFile("tests/pos-custom-args/i8875.scala", defaultOptions.and("-Xprint:getters")),
68+
compileFile("tests/pos-custom-args/i9267.scala", defaultOptions.and("-Ystop-after:erasure")),
6869
).checkCompile()
6970
}
7071

tests/pos-custom-args/i9267.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class A

0 commit comments

Comments
 (0)