li3zhen1
(li3zhen1)
1
Hi!
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?
2 Likes
li3zhen1
(li3zhen1)
2
This might be related to this bug, which has had quite a bit of discussion, though none from the team yet, and it hasn't been triaged.
1 Like
dnadoba
(David Nadoba)
5
This is a bug. Can you please fill an issue here and post it again to this thread.
Preferable with a simple reproducer if you can. Thank you!
hborla
(Holly Borla)
6
2 Likes
dnadoba
(David Nadoba)
7
Ah amazing, thank you! Recently run into this as well and could reproduce it on main but this PR was just merged last week.