Skip to content

[5.3] [CS] Fix a crash in AllowArgumentMismatch #32361

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 1 commit into from
Jun 15, 2020
Merged

[5.3] [CS] Fix a crash in AllowArgumentMismatch #32361

merged 1 commit into from
Jun 15, 2020

Conversation

theblixguy
Copy link
Collaborator

@theblixguy theblixguy commented Jun 13, 2020

Cherry-pick of #32356 with an adjustment (using isa instead of isExpr as it doesn't exist on 5.3 branch).


Explanation: The compiler was crashing because AllowArgumentMismatch relies on getFunctionArgApplyInfo() returning a non-optional FunctionArgApplyInfo value, which we failed to provide in a situation when simplifyLocator couldn't simplify a locator where a TypeExpr was provided as a subscript argument.

Scope: Affects use of subscript expressions.

SR Issue: SR-12990.

Risk: Low. This fixes a compiler crash which was found by the stress tester.

Testing: Added a validation test

Reviewed by: @xedin

Resolves: rdar://problem/64303153

…e the index expression isn't a tuple or paren expression
@theblixguy theblixguy requested a review from a team as a code owner June 13, 2020 00:27
@theblixguy theblixguy changed the title [5.3] [CS] [CS] Fix a crash in AllowArgumentMismatch [5.3] [CS] Fix a crash in AllowArgumentMismatch Jun 13, 2020
@theblixguy
Copy link
Collaborator Author

@swift-ci please test

@xedin
Copy link
Contributor

xedin commented Jun 13, 2020

Thank you!

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.

4 participants