Open YOCKOW opened 2 weeks ago
Looks like swift-syntax isn't correctly constructing the AST for this operator. I'll send this over to them shortly.
Synced to Apple’s issue tracker as rdar://137278375
We currently only fold standard operators during macro expansion. Sending to the compiler repo because it would need to communicate the operator precedence groups.
Description
Given the following code:
As the comments in the code says, the expression with a custom operator on the right side is not correctly expanded as expected.
Expected behavior
#expect(MyFancyStruct() == 1 ~~~~ 2)
is supposed to be the same with#expect(MyFancyStruct() == (1 ~~~~ 2))
.Actual behavior
Fails to compile because the expanded statement is invalid.
Steps to reproduce
Described above.
swift-testing version/commit hash
Testing Library Version: 94 (arm64e-apple-macos13.0)
Swift & OS version (output of
swift --version ; uname -a
)