Skip to content

[cxx-interop] Allow imported subscript to have generic parameters. #70348

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
Dec 10, 2023

Conversation

hborla
Copy link
Member

@hborla hborla commented Dec 9, 2023

Subscripts imported from C++ can have generic parameter lists, but the Clang Importer was assuming that imported subscripts always have a null generic parameter list. Propagate generic parameters from the getter in SwiftDeclSynthesizer.

Thanks to @simanerush for adding the ASTVerifier change that surfaced this bug!

Resolves rdar://119406160, #70328

@simanerush
Copy link
Member

Neat! Thank you for fixing this🤩

@hborla hborla force-pushed the cxx-generic-subscript branch from f6b42d4 to 450e59c Compare December 9, 2023 05:26
@hborla
Copy link
Member Author

hborla commented Dec 9, 2023

@swift-ci please smoke test

Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@hborla hborla merged commit e4436ba into swiftlang:main Dec 10, 2023
@hborla hborla deleted the cxx-generic-subscript branch December 10, 2023 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants