Skip to content

Commit 310226f

Browse files
committed
Show budget exhaustion warning in both modes
1 parent 7c9a2f2 commit 310226f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,7 @@ class Objects(using Context @constructorOnly):
427427
try
428428
init(tpl, obj, classSym)
429429
catch case _: OutOfQuotaException =>
430-
if !BestEffort then
431-
report.warning("Giving up checking initializatino of " + classSym + " due to exhausted budget", classSym.sourcePos)
430+
report.warning("Giving up checking initializatino of " + classSym + " due to exhausted budget", classSym.sourcePos)
432431
data.addQuotaExhausted(obj)
433432
data.addChecked(obj)
434433
data.popChecking()
@@ -446,7 +445,7 @@ class Objects(using Context @constructorOnly):
446445
iterate()
447446
else
448447
if !BestEffort then
449-
report.warning("Giving up checking initializatino of " + classSym + " due to complex code", classSym.sourcePos)
448+
report.warning("Giving up checking initializatino of " + classSym + " due to iteration > = " + count, classSym.sourcePos)
450449
data.addChecked(obj)
451450
obj
452451
else

0 commit comments

Comments
 (0)