I've been working on macros recently. Here's a macro that replaces a generic parameter and puts a new specialized version alongside the original type.
The code without extension part compiles, but it produces circular reference error when adding the extension. And if I move the extension to another file, code compiles.
I did some search and only found this: https://github.com/apple/swift-evolution/blob/main/proposals/0389-attached-macros.md#restrictions-on-arbitrary-names , but not sure if they are actually the same situation.
Is it by design or some bug?