@live void glorifiedNop() { foreach(int tmp; 0..10) { } } run with -preview=dip1021 https://run.dlang.io/is/zGpg3C
Error: variable onlineapp.glorifiedNop.tmp is both Undefined and Owner
Confirmed with v2.101.0.
The trouble here appears to be that I thought I could get away with just gen vectors, but the DFA needs kill vectors, too.
@WalterBright created dlang/dmd pull request #16367 "fix bugzilla Issue 21854 - @live breaks foreach over integers" fixing this issue: - fix bugzilla Issue 21854 - @live breaks foreach over integers https://github.com/dlang/dmd/pull/16367
dlang/dmd pull request #16367 "fix bugzilla Issue 21854 - @live breaks foreach over integers" was merged into master: - d32f565093a4ec9bc9a7b92b23416b0df586d353 by Walter Bright: fix bugzilla Issue 21854 - @live breaks foreach over integers https://github.com/dlang/dmd/pull/16367