File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ object Symbols extends SymUtils {
129129 final def lastKnownDenotation : SymDenotation =
130130 lastDenot
131131
132- private [core ] def defRunId : RunId =
132+ private [dotc ] def defRunId : RunId =
133133 lastDenot.validFor.runId
134134
135135 private inline def associatedFileMatches (inline filter : AbstractFile => Boolean )(using Context ): Boolean =
Original file line number Diff line number Diff line change @@ -322,8 +322,10 @@ object Checking {
322322 ! sym.is(Private ) && prefix.derivesFrom(sym.owner)
323323 || {
324324 val pcls = prefix.symbol.moduleClass
325- if pcls.isStaticOwner then pcls.isDefinedInCurrentRun
326- else isInteresting(prefix.prefix)
325+ if pcls.isStaticOwner then
326+ pcls.span.exists && pcls.defRunId == ctx.runId // cheaper approximation to isDefinedInCurrentRun
327+ else
328+ isInteresting(prefix.prefix)
327329 }
328330 case SuperType (thistp, _) => isInteresting(thistp)
329331 case AndType (tp1, tp2) => isInteresting(tp1) || isInteresting(tp2)
You can’t perform that action at this time.
0 commit comments