Open
Description
Description
If I attempt to label closure arguments during macro expansion:
let arg0 = context.makeUniqueName("")
return """
{ \(arg0) in
...
}
"""
The compiler complains:
🛑 Inferred projection type 'Int' is not a property wrapper
🛑 Inferred projection type '() -> Int' is not a property wrapper
This means I can't reliably produce closure argument names, which is problematic if my macro expansion generates a closure and the macro is being used inside another closure:
@Test func foo() {
let x = [2, 4, 6]
x.forEach {
#expect($0 % 2 == 0) // 🛑 Anonymous closure arguments cannot be used inside
// a closure that has explicit arguments; did you mean '$0'?
}
}
Steps to Reproduce
See above.