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

--- Comment #4 from Rainer Schuetze <[email protected]> ---
if you change the test to

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

enum a = test();


it fails for older versions, too. That's caused by the semantic analysis
already trying to optimize expressions. I guess it must not do this in case of
errors but defer it to the runtime error.

--

Reply via email to