@RazvanN7 created dlang/dmd pull request #13542 "Fix Issue 22646 - [REG2.099] CT bounds checking ignores short circuit evaluation" fixing this issue:
- Fix Issue 22646 - [REG2.099] CT bounds checking ignores short circuit evaluation
https://github.com/dlang/dmd/pull/13542
Comment #4 by dlang-bot — 2022-01-18T13:15:30Z
dlang/dmd pull request #13542 "Fix Issue 22646 - [REG2.099] CT bounds checking ignores short circuit evaluation" was merged into master:
- 8f193572300fd23c2e46459ee333cfc8cfd37652 by RazvanN7:
Fix Issue 22646 - [REG2.099] CT bounds checking ignores short circuit evaluation
https://github.com/dlang/dmd/pull/13542
Comment #5 by moonlightsentinel — 2022-01-18T14:21:37Z
The patch does not work for static arrays that are also affected by this regression:
static template Bug(T, const T name)
{
enum bool ok = name.length < 3 || name[0..3] != "pad";
}
pragma(msg, Bug!(char[1], "x").ok);
Comment #6 by b2.temp — 2022-01-18T21:57:03Z
that PR looks like a bad workaround.
Comment #7 by b2.temp — 2022-01-18T22:06:27Z
the real bug is in optimize(), where D does const fold
Comment #8 by dlang-bot — 2022-12-20T13:52:40Z
@ibuclaw created dlang/dmd pull request #14722 "fix Issue 22646 - [REG2.099] CT bounds checking ignores short circuit evaluation" fixing this issue:
- fix Issue 22646 - [REG2.099] CT bounds checking ignores short circuit evaluation
https://github.com/dlang/dmd/pull/14722
Comment #9 by dlang-bot — 2022-12-21T09:18:27Z
dlang/dmd pull request #14722 "fix Issue 22646 - [REG2.099] CT bounds checking ignores short circuit evaluation" was merged into stable:
- 59d7cb9667a992c187e121615a224ba9b30d5f7b by Iain Buclaw:
fix Issue 22646 - [REG2.099] CT bounds checking ignores short circuit evaluation
https://github.com/dlang/dmd/pull/14722
Comment #10 by dlang-bot — 2023-01-01T06:25:06Z
dlang/dmd pull request #14765 "merge stable" was merged into master:
- 57874f498053152ec18e4ebe5be95337ebf83b3b by Iain Buclaw:
fix Issue 22646 - [REG2.099] CT bounds checking ignores short circuit evaluation
https://github.com/dlang/dmd/pull/14765