cat > bug.d << CODE
static if (true)
enum a = b;
static if (true)
enum b = 0;
CODE
dmd -c bug.d
----
Obviously this is a problem with semantic analysis being done in lexical order instead of lazily.
Comment #1 by robert.schadek — 2024-12-13T18:11:32Z