Skip to content

Commit

Permalink
Retain defTree while checking global objects
Browse files Browse the repository at this point in the history
  • Loading branch information
liufengyun committed Apr 6, 2023
1 parent 9644cf5 commit 2512562
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compiler/src/dotty/tools/dotc/core/Symbols.scala
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ object Symbols {
def retainsDefTree(using Context): Boolean =
ctx.settings.YretainTrees.value ||
denot.owner.isTerm || // no risk of leaking memory after a run for these
denot.isOneOf(InlineOrProxy) || // need to keep inline info
ctx.settings.YcheckInit.value // initialization check
denot.isOneOf(InlineOrProxy) || // need to keep inline info
ctx.settings.YcheckInit.value || // initialization check
ctx.settings.YcheckInitGlobal.value // initialization check

/** The last denotation of this symbol */
private var lastDenot: SymDenotation = _
Expand Down

0 comments on commit 2512562

Please sign in to comment.