Skip to content

[6.2][Parse] Parse operator function with value generics #81268

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 5, 2025

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented May 3, 2025

Cherry-pick #81265 into release/6.2

  • Explanation: Operator function parsing has a heuristics to determine if < a part of the operator name or the generic parameter clause. Previously if < was followed by an identifier it considered < was a start of the generic parameter clause. However, since value generics was introduced, generic parameter clause can start with < let which was not handled.
  • Scope: Parse
  • Risk: Low, the change is trivial.
  • Testing: Added an regression test case
  • Issue: rdar://149556573
  • Reviewer: Ben Barham (@bnbarham)

Operator function parsing has a heuristics to determine if `<` a part of
the operator name or the generic parameter clause. Handle `let` there
because value generics uses it.

rdar://149556573
(cherry picked from commit 682d263)
@rintaro rintaro requested a review from a team as a code owner May 3, 2025 00:41
@rintaro
Copy link
Member Author

rintaro commented May 3, 2025

swiftlang/swift-syntax#3071
@swift-ci Please test

@rintaro rintaro merged commit e6f5966 into swiftlang:release/6.2 May 5, 2025
5 checks passed
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