This code causes due to a stack overflow: enum Foo { a = Foo.init }
(In reply to moonlightsentinel from comment #0) > This code causes due to a stack overflow: *This code causes dmd to crash due to a stack overflow:
dlang/dmd pull request #12346 "Fix 21791 - Stack overflow for forward-referenced enum initializer" was merged into master: - f45c5b98400be67f16fbf9210c761bbff492bb5d by MoonlightSentinel: Fix 21791 - Stack overflow for forward-referenced enum initializer Ensure that semantic for the `EnumMember` chosen as a `.init` was already done. The previous check was never hit because `sematicRun` is changed before analyzing the enum body. https://github.com/dlang/dmd/pull/12346