Skip to content

[4.2][Refactoring] Fix crasher in switch with non-nominal subject type #18210

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

rintaro
Copy link
Member

@rintaro rintaro commented Jul 25, 2018

Cherry-pick of #18177 reviewed by @nkcsgexi for swift-4.2-branch.

  • Explaination: Getting list of applicable refactoring kind on switch or default checks if the subject type is "expandable" or not. Currently, this is limited to single enum type. Previously there was wrong assumption where subject type is always nominal type. But that is not true if the subject is, for example, tuple type.
  • Scope: Affect getting list of applicable refactoring kind.
  • Issue: rdar://problem/42098130
  • Risk: Very-low. Just added nullptr check where it should be.
  • Testing: Added regression test cases.
  • Reviewed By: Xi Ge ([Refactoring] Fix crasher in switch with non-nominal subject type #18177)

@rintaro
Copy link
Member Author

rintaro commented Jul 25, 2018

@swift-ci Please test

@rintaro rintaro changed the title [Refactoring] Fix crasher in switch with non-nominal subject type [4.2][Refactoring] Fix crasher in switch with non-nominal subject type Jul 25, 2018
@rintaro
Copy link
Member Author

rintaro commented Jul 26, 2018

@swift-ci Please nominate

@akyrtzi akyrtzi merged commit 7085923 into swiftlang:swift-4.2-branch Jul 26, 2018
@rintaro rintaro deleted the 4.2-refactoring-rdar42098130 branch July 30, 2018 03:17
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