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.
This works:
But if you remove the
_argument label or change it to aninfixorpostfixoperator, you get a compiler error in the macro expansion. Either@Testshould properly handle these cases or the macro should detect and reject attempts to use it on an operator.