We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The function body macro proposal states:
When using the shorthand syntax for get-only properties, a function body macro can be applied to the property itself:
But the following does not compile
@stringify // error: 'body' macro cannot be attached to var ('x') var x: Int { 2 }
With stringify being a function body macro.
stringify
Attaching a function body macro to a getter also doesn’t work:
var x: Int { @stringify get { 1 } // error: Declaration is not a type with an optional code block }
rdar://130739935
MyMacro.zip
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The function body macro proposal states:
But the following does not compile
With
stringifybeing a function body macro.Attaching a function body macro to a getter also doesn’t work:
rdar://130739935
MyMacro.zip
The text was updated successfully, but these errors were encountered: