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 @@ -134,7 +134,7 @@ object Symbols extends SymUtils {
134
134
final def lastKnownDenotation : SymDenotation =
135
135
lastDenot
136
136
137
- private [core ] def defRunId : RunId =
137
+ private [dotc ] def defRunId : RunId =
138
138
lastDenot.validFor.runId
139
139
140
140
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 {
335
335
! sym.is(Private ) && prefix.derivesFrom(sym.owner)
336
336
|| {
337
337
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)
340
342
}
341
343
case SuperType (thistp, _) => isInteresting(thistp)
342
344
case AndType (tp1, tp2) => isInteresting(tp1) || isInteresting(tp2)
You can’t perform that action at this time.
0 commit comments