mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Serialization: Bring back shadowing but only after the filtering
Followup fix to #80009. We can still get ambiguities from colliding decls across modules with the deserialization filtering. Bring back calling the general lookup shadowing after the filtering. This way it won't use filtered out decls to hide potential candidates. rdar://148286345
This commit is contained in:
@@ -2766,6 +2766,12 @@ giveUpFastPath:
|
||||
if (M)
|
||||
return diagnoseFatal();
|
||||
|
||||
if (values.size() > 1) {
|
||||
// Apply shadowing filtering after other local filters so we don't rule out
|
||||
// valid candidates shadowed by invalid ones.
|
||||
removeShadowedDecls(values, baseModule);
|
||||
}
|
||||
|
||||
// When all is said and done, we should have a single value here to return.
|
||||
if (values.size() != 1) {
|
||||
return llvm::make_error<XRefError>("result is ambiguous", pathTrace,
|
||||
|
||||
Reference in New Issue
Block a user