File tree 2 files changed +5
-3
lines changed
compiler/src/dotty/tools/dotc
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 {
129
129
final def lastKnownDenotation : SymDenotation =
130
130
lastDenot
131
131
132
- private [core ] def defRunId : RunId =
132
+ private [dotc ] def defRunId : RunId =
133
133
lastDenot.validFor.runId
134
134
135
135
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 {
322
322
! sym.is(Private ) && prefix.derivesFrom(sym.owner)
323
323
|| {
324
324
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)
327
329
}
328
330
case SuperType (thistp, _) => isInteresting(thistp)
329
331
case AndType (tp1, tp2) => isInteresting(tp1) || isInteresting(tp2)
You can’t perform that action at this time.
0 commit comments