Skip to content

[cxx-interop] Fix namespace lookup #58659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2022

Conversation

egorzhdan
Copy link
Contributor

If a namespace has redecls in different modules, Swift sometimes picked a redecl which is not visible from the requested module, and wrongly removed the namespace from lookup results.

This resulted in errors like this:

*** DESERIALIZATION FAILURE ***
Could not deserialize type for 'init(cxxString:)'
Caused by: top-level value not found (std)
Cross-reference to module '__ObjC'
... std

If a namespace has redecls in different modules, Swift sometimes picked a redecl which is not visible from the requested module, and wrongly removed the namespace from lookup results.

This resulted in errors like this:
```
*** DESERIALIZATION FAILURE ***
Could not deserialize type for 'init(cxxString:)'
Caused by: top-level value not found (std)
Cross-reference to module '__ObjC'
... std
```
@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label May 4, 2022
@egorzhdan egorzhdan requested a review from zoecarver May 4, 2022 12:36
@egorzhdan
Copy link
Contributor Author

We'll need one more lookup fix before we can properly test this.

This is a requirement for #58452.

@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan merged commit dabaa69 into main May 4, 2022
@egorzhdan egorzhdan deleted the egorzhdan/cxx-namespace-lookup-fix branch May 4, 2022 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant