Skip to content

Commit 16b1318

Browse files
committed
Bail out of checking anonymous classes
1 parent 60b7892 commit 16b1318

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/src/dotty/tools/dotc/transform/init/Checking.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,11 @@ object Checking {
350350
PromoteCold(eff.source, state.path).toErrors
351351

352352
case pot @ Warm(cls, outer) =>
353-
checkPromoteWarm(pot, eff)
353+
if cls.isAnonymousClass then
354+
// bail out for now, see https://github.com/lampepfl/dotty/pull/11533#issuecomment-811819003
355+
PromoteWarm(pot, eff.source, state.path).toErrors
356+
else
357+
checkPromoteWarm(pot, eff)
354358

355359
case Fun(pots, effs) =>
356360
val errs1 = state.test {

0 commit comments

Comments
 (0)