[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 26 04:29:54 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=18115

--- Comment #1 from Basile B. <b2.temp at gmx.com> ---
The '&&' RHS  shouldn't be evaluated even in this simplified test case:

```
int test()
{
    if (test.stringof.length >= 6 &&
        test.stringof[$-7..$] == "1234567") {}
    return 0;
}

enum a = test();
```

When trying to build commit by commit i've found that
https://github.com/dlang/dmd/commit/9a57a965647ca7eef4c3149158b9256edb543f8a is
the culprit of the regression.

--


More information about the Digitalmars-d-bugs mailing list