Skip to content

[CS] Coerce dynamic member strings to their param type #28512

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 2 commits into from
Dec 2, 2019

Conversation

hamishknight
Copy link
Contributor

Previously we were assuming that the string literal argument was always of type String, however any ExpressibleByStringLiteral parameter is allowed. This PR moves buildDynamicMemberLookupIndexExpr into ExprRewriter, and passes the string literal through handleStringLiteralExpr to properly handle its coercion to the parameter type.

Resolves SR-11877.

@hamishknight hamishknight requested a review from xedin November 30, 2019 21:01
@hamishknight
Copy link
Contributor Author

@swift-ci please test

Move `buildDynamicMemberLookupIndexExpr` into
ExprRewriter, and pass the string literal through
`handleStringLiteralExpr` to properly handle its
coercion to the parameter type.
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please smoke test and merge

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