Skip to content

[3.1] SIL: Canonicalize capture types with the AST function's generic signature. #7236

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

jckarter
Copy link
Contributor

@jckarter jckarter commented Feb 3, 2017

Explanation: When a closure referred to a type parameter in a context where the parameter was same-type-constrained to a concrete type, the compiler would crash.

Scope: Fallout from allowing same-type constraints on concrete type extensions. Where we used to raise compiler errors, we would now crash.

Issue: rdar://problem/30254048

Risk: Low

Testing: Swift CI, project attached to radar

…ture.

When lowering closures, we avoid capturing the enclosing generic context when possible. However, the generic context may still be necessary to canonicalize types mentioned inside the closure, such as when an associated type is referred to that is same-typed to a concrete type. Fixes rdar://problem/30254048.
@jckarter
Copy link
Contributor Author

jckarter commented Feb 3, 2017

@swift-ci Please test

@jckarter jckarter changed the title SIL: Canonicalize capture types with the AST function's generic signature. [3.1] SIL: Canonicalize capture types with the AST function's generic signature. Feb 3, 2017
@swift-ci
Copy link
Contributor

swift-ci commented Feb 3, 2017

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 6f4e65a
Test requested by - @jckarter

@jckarter
Copy link
Contributor Author

jckarter commented Feb 3, 2017

@swift-ci Please clean test

@ematejska ematejska merged commit 938dbf4 into swiftlang:swift-3.1-branch Feb 4, 2017
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