[Issue 22981] Another forward reference bug involving a string mixin

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 30 16:04:29 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=22981

--- Comment #5 from Max Samukha <maxsamukha at gmail.com> ---
(In reply to Basile-z from comment #4)
> I think that the compiler should perform a "pre-dsymbolsem" pass in
> aggregate decls, that pass would only target `enum` and other `static`
> declarations.
> 
> That could kill the fake cycle on `E` and other similar bugs.

I am not competent to comment on this. FWIW, attributes, which are conceptually
similar to static members, don't have this issue:

mixin ("enum E {", __traits(getAttributes, S)[0], "}");

@("a")
struct S
{
    E e;
}

void main()
{
}

--


More information about the Digitalmars-d-bugs mailing list