-
Notifications
You must be signed in to change notification settings - Fork 128
Labels
bug🪲 Something isn't working🪲 Something isn't workingmacros🔭 Related to Swift macros such as @Test or #expect🔭 Related to Swift macros such as @Test or #expecttriagedThis issue has undergone initial triageThis issue has undergone initial triage
Milestone
Description
This works:
prefix operator ^
@Test(arguments: [(0)])
prefix func ^(_ lhs: Int) {
#expect(1 == 3)
}But if you remove the _ argument label or change it to an infix or postfix operator, you get a compiler error in the macro expansion. Either @Test should properly handle these cases or the macro should detect and reject attempts to use it on an operator.
Metadata
Metadata
Assignees
Labels
bug🪲 Something isn't working🪲 Something isn't workingmacros🔭 Related to Swift macros such as @Test or #expect🔭 Related to Swift macros such as @Test or #expecttriagedThis issue has undergone initial triageThis issue has undergone initial triage