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

--- Comment #1 from Eyal <[email protected]> ---
Slightly simplified:

auto check() {
    int count;
    int[] x() { count++; return []; }
    x()[] = 1;
    assert(count == 1); // fails in CTFE only, where count == 2, LHS calls are
duplicated in CTFE
    return true;
}

unittest {
    cast(void)check(); // works
    static assert(check());
}

--

Reply via email to