Open juozasvalancius opened 1 year ago
Hi facing the same issue now. Just a follow-up. What's the progress regarding this issue? Thank you!
Also here. Thanks for reporting, hoping for a fix...
It's also current blocking me on a macros-heavy project.
Same here, blocking awesome ideas realisation. Any updates on this?
Tried on Swift 5.9.2 and 5.10 - doesn't work. 🙅♂️
Tried on Swift 6.0 DEVELOPMENT-SNAPSHOT-2024-04-30-a-osx and it works! 🚀
Description
Using a freestanding declaration macro inside a class produces a build error:
Here is the expanded macro:
The same code compiles if the macro is used inside a struct.
Steps to reproduce
Create a swift package using the macro template.
Client code:
Macro declaration:
Macro implementation:
Expected behavior
swift run MyMacroClient
should compile and run without any errors.Environment