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

Availability conditions shouldn't have to be identifiers or literals #17

Closed
alex-pinkus opened this issue Oct 16, 2021 · 0 comments · Fixed by #28
Closed

Availability conditions shouldn't have to be identifiers or literals #17

alex-pinkus opened this issue Oct 16, 2021 · 0 comments · Fixed by #28
Labels
bug Something isn't working error-for-valid-code The grammar causes a parsing error for some code that should parse top-repos-error A failure that shows up in one of the top repos parsed by the `top-repos` script

Comments

@alex-pinkus
Copy link
Owner

alex-pinkus commented Oct 16, 2021

From Alamofire at Tests/TLSEvaluationTests.swift

It's legal to do something like:

if #available(iOS 10.1, macOS 10.12.0, tvOS 10.1, *) {
    ...
}

In that example, 10.12.0 isn't a real literal (it's got an extra dot). Maybe just allow literals to be joined by dots here?

@alex-pinkus alex-pinkus added bug Something isn't working error-for-valid-code The grammar causes a parsing error for some code that should parse top-repos-error A failure that shows up in one of the top repos parsed by the `top-repos` script labels Oct 16, 2021
alex-pinkus added a commit that referenced this issue Oct 16, 2021
* Better specify availability condition arguments (int.int.int is now
legal, other literals are not) (Fixes #17)
* Allow protocol composition types anywhere we allow implicitly
unwrapped types (Fixes #18)
* Allow subscripts to have more than one argument (Fixes #22)
* Add support for property wrapper projections (Fixes #23)
* Let protocol property requirements specify mutation modifiers
(Fixes #24)
* Support annotations on parameters (Fixes #26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working error-for-valid-code The grammar causes a parsing error for some code that should parse top-repos-error A failure that shows up in one of the top repos parsed by the `top-repos` script
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant