Skip to content
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

[4.0] Sema: Don't allow key path literals to refer to static members. #11062

Merged
merged 1 commit into from Jul 20, 2017

Conversation

jckarter
Copy link
Member

Explanation: Forming a key path that referenced a static property would crash the compiler.

Scope: Crash on invalid

Issue: rdar://problem/33318422 | SR-5453

Risk: Low, raises an error on invalid code that previously crashed the compiler; isolated to key paths

Testing: Swift CI, test case from Jira

@jckarter
Copy link
Member Author

@swift-ci Please test

@jckarter
Copy link
Member Author

@xedin Does this look good for the 4.0 branch?

@jckarter jckarter requested a review from xedin July 19, 2017 21:55
Copy link
Member

@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 changed the title Sema: Don't allow key path literals to refer to static members. [4.0] Sema: Don't allow key path literals to refer to static members. Jul 19, 2017
This is theoretically supportable some day, but isn't implemented today. Fixes rdar://problem/33318422 | SR-5453.

(cherry picked from commit 70d2ef14381fcc61ea998846599ae59252d0dcfe)
@jckarter
Copy link
Member Author

@swift-ci Please test

1 similar comment
@jckarter
Copy link
Member Author

@swift-ci Please test

@swift-ci
Copy link
Collaborator

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 6337d0647c3ff73b1749b1bd81d202b10eedd48a
Test requested by - @jckarter

@jckarter jckarter merged commit 6749efb into apple:swift-4.0-branch Jul 20, 2017
@jckarter jckarter deleted the static-key-path-error-4.0 branch July 20, 2017 17:13
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.

None yet

3 participants