Skip to content

[Parser] Allow parsing any in structural position within enum associated value types. #58950

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
merged 1 commit into from
May 18, 2022

Conversation

hborla
Copy link
Member

@hborla hborla commented May 17, 2022

Previously, this code would result in an error:

protocol P {}

enum E {
  case hello((any P) -> Void) // error: expected parameter name followed by ':'
}

This change simply calls into Parser::startsParameterName, which already supports looking for contextual any and some, instead of repeating the code without checking for contextual keywords in Parser::canParseTypeTupleBody.

Resolves: rdar://93382182

…iated

value types.

This change simply calls into Parser::startsParameterName, which already
supports parsing 'any' and 'some', instead of repeating the code without
checking for contextual keywords.
@hborla hborla requested a review from rintaro May 17, 2022 21:47
@hborla
Copy link
Member Author

hborla commented May 17, 2022

@swift-ci please smoke test

@hborla
Copy link
Member Author

hborla commented May 17, 2022

@swift-ci please test source compatibility

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