Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: false positive error about recursive type aliases #23055
@JicLotus Thanks for volunteering. If you'd like to work on this, feel free. I do want to caution though that this is likely to be a fairly subtle and involved part of the compiler.
The problem is that we recursively evaluate type declarations as needed. I think we'll need to undo this and instead evaluate type declarations in a two pass algorithm:
I'm suspecting we'll also have to split constant evaluation into a separate pass too. I briefly touched on this idea in #13890 (comment). But it might be possible to fix this issue without doing that.