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

--- Comment #4 from deadalnix <deadal...@gmail.com> ---
No, that is true in general. For instance, you exemple:

char inc(string s, ref int i) {
    scope(success) i++;
    if (s == null)
        return 0;
    if (s.length > 256)
        return 1;
    return s[i];
}

Is trivially equivalent to:

char inc(string s, ref int i) {
    char ret;
    if (s == null) {
        ret = 0;
        goto Exit;
    }
    if (s.length > 256) {
        ret = 1:
        goto Exit;
    }

    ret = s[i];

Exit:
    i++;
    return ret;
}

--

Reply via email to