You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix stale top level synthetic package object being used in later runs (#23464)
Fixes#13821
To explain what was happening:
We previously got a completion assertion crash, because a stale symbol
(`val candidate`) was brought forward into a new run, even though it
should not have been, when searching for implicits. This was caused by
the synthetic top level package object (`file$package`, generated only
when top level definitions require it to, which is why the issue
appeared only when `type DFBits = Long` was present) passing
`stillValid` check, despite not being found in the Symbols owned by
owner (`package <empty>`). This would cause all of the stale members of
that to also be brought forward (as they would fulfill the requirements
of `stillValidInOwner`).
The stale top level package would incorrectly pass the
`(denot.is(Synthetic) && denot.is(ModuleClass) &&
stillValidInOwner(denot.companionClass))` check in stillValidInOwner,
despite companionClass of that package object being a noSymbol. Now we
also check if companionClass is a `noSymbol` explicitly to avoid this
issue.
0 commit comments