Skip to content

[4.0] Don't consider KeyPathApplication operations when looking up non-SubscriptExprs. #11089

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

Conversation

jckarter
Copy link
Contributor

Explanation: Introducing the global key path subscript operation introduced an ambiguity bug for code that tried to reference functions named subscript (using backtick quoted identifiers). This is fixed more deeply on master by #9989; this is a focused compatibility fix for 4.0.

Scope: Source compatibility regression; impacts ability to use AppKit because NSText has a -subscript: action.

Issue: SR-5513 | rdar://problem/33413614

Risk: Low, targeted bug fix

Testing: Swift CI, example from Jira

jckarter added 2 commits July 20, 2017 15:17
…them.

Assertions tripped while trying to reproduce SR-5513.
…iptExprs.

Interactions with the rest of the type checker cause use of functions named `subscript` with backtick-quotes to become ambiguous. This is more fully and robustly solved in master by swiftlang#9989, but that's too invasive a change for 4.0, and we need a spot fix to prevent source compatibility regressions such as SR-5513.
@jckarter
Copy link
Contributor Author

@xedin Does this look ok for 4.0?

@jckarter jckarter requested a review from xedin July 20, 2017 23:02
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter
Copy link
Contributor Author

@swift-ci Please test source compatibility

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jckarter jckarter merged commit 57d9fb8 into swiftlang:swift-4.0-branch Jul 21, 2017
@jckarter jckarter deleted the quoted-subscript-identifier-4.0 branch July 21, 2017 03:43
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.

2 participants