Skip to content

Commit 2512562

Browse files
committed
Retain defTree while checking global objects
1 parent 9644cf5 commit 2512562

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ object Symbols {
8282
def retainsDefTree(using Context): Boolean =
8383
ctx.settings.YretainTrees.value ||
8484
denot.owner.isTerm || // no risk of leaking memory after a run for these
85-
denot.isOneOf(InlineOrProxy) || // need to keep inline info
86-
ctx.settings.YcheckInit.value // initialization check
85+
denot.isOneOf(InlineOrProxy) || // need to keep inline info
86+
ctx.settings.YcheckInit.value || // initialization check
87+
ctx.settings.YcheckInitGlobal.value // initialization check
8788

8889
/** The last denotation of this symbol */
8990
private var lastDenot: SymDenotation = _

0 commit comments

Comments
 (0)