Skip to content

[5.0] SILGen: Open existential lvalues on entry into an OpenExistentialExpr again. #14461

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 7, 2018

Explanation: Fixes a regression in handling calls to mutating protocol extension methods with default arguments.

Scope: Regression from 4.0

Issue: rdar://problem/37031037

Risk: Low, a bug fix.

Testing: Swift CI, test case from Radar

Reviewed by: @rjmccall

… again.

4b25945 changed codegen for lvalue OpenExistentialExprs so that the existential was not opened until the OpaqueValue's lvalue was evaluated, but this is incorrect—we need to open the dynamic type of the existential immediately since it can be used arbitrarily within the subexpression. This caused a regression when evaluating default argument generators on protocol extension methods (rdar://problem/37031037), and would become a bigger problem when we generalize the ability to open existentials.
@jckarter
Copy link
Contributor Author

jckarter commented Feb 7, 2018

@swift-ci Please test

@jckarter jckarter merged commit 4eaabd1 into swiftlang:swift-5.0-branch Feb 8, 2018
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.

1 participant