Skip to content

Commit 4de0dd7

Browse files
committed
Make checkCompanion stable against future Defs
1 parent 31c56ee commit 4de0dd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dotty/tools/dotc/transform/TreeChecker.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ class TreeChecker extends Phase with SymTransformer {
5858

5959
def checkCompanion(symd: SymDenotation)(implicit ctx: Context): Unit = {
6060
val cur = symd.linkedClass
61-
val prev = ctx.atPhase(ctx.phase.prev) {
62-
implicit ctx =>
61+
ctx.withMode(Mode.FutureDefsOK).atPhase(ctx.phase.prev) {
62+
implicit ctx: Context =>
6363
symd.symbol.linkedClass
6464
}
6565

0 commit comments

Comments
 (0)