Skip to content

Commit 4efca0f

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ class TreeChecker extends Phase with SymTransformer {
5959
def checkCompanion(symd: SymDenotation)(implicit ctx: Context): Unit = {
6060
val cur = symd.linkedClass
6161
val prev = ctx.atPhase(ctx.phase.prev) {
62-
implicit ctx =>
62+
ct => {
63+
implicit val ctx: Context = ct.withMode(Mode.FutureDefsOK)
6364
symd.symbol.linkedClass
65+
}
6466
}
6567

6668
if (prev.exists)

0 commit comments

Comments
 (0)