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 @@ -134,7 +134,7 @@ object Symbols extends SymUtils {
134134 final def lastKnownDenotation : SymDenotation =
135135 lastDenot
136136
137- private [core ] def defRunId : RunId =
137+ private [dotc ] def defRunId : RunId =
138138 lastDenot.validFor.runId
139139
140140 private inline def associatedFileMatches (inline filter : AbstractFile => Boolean )(using Context ): Boolean =
Original file line number Diff line number Diff line change @@ -335,8 +335,10 @@ object Checking {
335335 ! sym.is(Private ) && prefix.derivesFrom(sym.owner)
336336 || {
337337 val pcls = prefix.symbol.moduleClass
338- if pcls.isStaticOwner then pcls.isDefinedInCurrentRun
339- else isInteresting(prefix.prefix)
338+ if pcls.isStaticOwner then
339+ pcls.span.exists && pcls.defRunId == ctx.runId // cheaper approximation to isDefinedInCurrentRun
340+ else
341+ isInteresting(prefix.prefix)
340342 }
341343 case SuperType (thistp, _) => isInteresting(thistp)
342344 case AndType (tp1, tp2) => isInteresting(tp1) || isInteresting(tp2)
You can’t perform that action at this time.
0 commit comments