Skip to content

PrintAsObjC: Fix crash when printing typedef that was imported inside an Objective-C generic class [5.3] #31948

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

Conversation

slavapestov
Copy link
Contributor

The assertion here is too strict. The TypeAliasDecl will inherit a
generic signature from the outer context even if it does not have
generic parameters of its own. Instead, let's just assert that the
TypeAliasDecl does not have its own generic parameters.

Fixes rdar://problem/63188938.

@slavapestov slavapestov requested a review from a team as a code owner May 21, 2020 21:24
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

… an Objective-C generic class

The assertion here is too strict. The TypeAliasDecl will inherit a
generic signature from the outer context even if it does not have
generic parameters of its own. Instead, let's just assert that the
TypeAliasDecl does not have its own generic parameters.

Fixes <rdar://problem/63188938>.
@slavapestov slavapestov force-pushed the print-as-objc-generic-typealias-assertion-5.3 branch from 7d9170d to 63f91d1 Compare May 21, 2020 21:36
@slavapestov slavapestov changed the title PrintAsObjC: Fix crash when printing typedef that was imported inside an Objective-C generic class PrintAsObjC: Fix crash when printing typedef that was imported inside an Objective-C generic class [5.3] May 21, 2020
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 7d9170d93e3618d0fb6e9500594dd63f4a3765b1

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 7d9170d93e3618d0fb6e9500594dd63f4a3765b1

@tkremenek tkremenek merged commit 8397013 into swiftlang:release/5.3 May 22, 2020
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants