Skip to content
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

Clang Importer: Set the ElementType of synthesized SubscriptDecls to the contextual generic type. #4128

Merged

Conversation

jckarter
Copy link
Member

@jckarter jckarter commented Aug 8, 2016

This matches what parsed SubscriptDecls do, avoiding a crash later in SILGen. Fixes SR-1576 / rdar://problem/26632701.

…the contextual generic type.

This matches what parsed SubscriptDecls do, avoiding a crash later in SILGen. Fixes rdar://problem/26632701.
@jckarter
Copy link
Member Author

jckarter commented Aug 8, 2016

@swift-ci Please test

@jckarter
Copy link
Member Author

jckarter commented Aug 8, 2016

@jrose-apple Does this look good for Swift 3?

@@ -726,6 +726,7 @@ namespace {
void visitSubscriptDecl(SubscriptDecl *SD) {
printCommon(SD, "subscript_decl");
OS << " storage_kind=" << getStorageKindName(SD->getStorageKind());
OS << " element=" << SD->getElementType()->getCanonicalType();
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably print the non-canonical type.

@tkremenek
Copy link
Member

@swift-ci smoke test os x

@tkremenek tkremenek merged commit a15553c into apple:swift-3.0-branch Aug 9, 2016
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.

None yet

3 participants