Skip to content

[6.2][SwiftParser] Parse operator function with value generics #3071

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

Open
wants to merge 1 commit into
base: release/6.2
Choose a base branch
from

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented May 3, 2025

Cherry-pick #3070 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 e7eb0b9)
@rintaro
Copy link
Member Author

rintaro commented May 3, 2025

swiftlang/swift#81268
@swift-ci Please test

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.

1 participant