-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Typechecker] Allow static functions to overload enum cases #23227
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.
Thanks!
…e() to compute the type for the enum element decl, etc
I have added some more tests to ensure non-functions can't redeclare an enum element (or vice versa). We only had one test for this, but I have added some more test cases to ensure we don't regress. |
@slavapestov Do you have any additional feedback or is this good to go? |
@swift-ci Please smoke test |
@swift-ci Please test source compatibility |
Fixes an issue with redeclaration checking where a static function would incorrectly get marked as a redeclaration of an enum element declaration, even if their types were different. See https://twitter.com/an0/status/1105187953834369025
Resolves SR-10084.