-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CS] Fix a crash in AllowArgumentMismatch #32356
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have it setup this way on purpose, AllowArgumentMismatch
should only be attached to the argument-to-parameter conversion failures and getFunctionArgApplyInfo
should be able to extract information based on that locator. Why does it fail in this case?
@xedin Oh sorry, I didn't realise it was intentional. In that case, I think it might be better to fix |
@theblixguy Right, that's what I expected, I think we need to adjust logic in |
@xedin Sounds good, that's what I have done now! |
…e the index expression isn't a tuple or paren expression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@swift-ci please smoke test |
@theblixguy Could you open a PR for 5.3? You'd have to adjust |
Sure, here's the 5.3 PR: #32361 |
The compiler was crashing because
AllowArgumentMismatch
relies ongetFunctionArgApplyInfo()
returning a non-optionalFunctionArgApplyInfo
value, which we failed to provide in a situation whensimplifyLocator
couldn't simplify a locator where aTypeExpr
was provided as a subscript argument.Resolves SR-12990
Resolves rdar://problem/64303153