Skip to content

Commit e70cba0

Browse files
committed
Bail out of checking anonymous classes
1 parent 36fabb9 commit e70cba0

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
@@ -360,7 +360,11 @@ object Checking {
360360
PromoteCold(eff.source, state.path).toErrors
361361

362362
case pot @ Warm(cls, outer) =>
363-
checkPromoteWarm(pot, eff)
363+
if cls.isAnonymousClass then
364+
// bail out for now, see https://github.com/lampepfl/dotty/pull/11533#issuecomment-811819003
365+
PromoteWarm(pot, eff.source, state.path).toErrors
366+
else
367+
checkPromoteWarm(pot, eff)
364368

365369
case Fun(pots, effs) =>
366370
val errs1 = state.test {

0 commit comments

Comments
 (0)