Any use of static foreach seems to crash when generating JSON info during compilation, e.g.: static foreach(enum i; 0..3) mixin("int a" ~ i.stringof ~ " = 1;"); build with "dmd -c -X test.d": object.Error@(0): Access Violation ---------------- 0x00515D77
This is caused by STClocal not having a string representation.
https://github.com/dlang/dmd/pull/7127
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/625ef5373c5469c0c01251fe17080318981ed52f fix Issue 17812 - crash when building JSON info with static foreach https://github.com/dlang/dmd/commit/d3eff8273875625cbdcfe624eff765d703e8d948 Merge pull request #7127 from tgehr/fix17812 fix Issue 17812 - crash when building JSON info with static foreach merged-on-behalf-of: Walter Bright <WalterBright@users.noreply.github.com>
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/625ef5373c5469c0c01251fe17080318981ed52f fix Issue 17812 - crash when building JSON info with static foreach https://github.com/dlang/dmd/commit/d3eff8273875625cbdcfe624eff765d703e8d948 Merge pull request #7127 from tgehr/fix17812