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

--- Comment #1 from Paul Backus <[email protected]> ---
This also affects delegates passed as arguments to template sequence
parameters. A reference to a different, non-delegate element of the same
sequence parameter can cause a closure to be allocated, as in the following
example:

---

auto call(Args...)() {
    return Args[0]();
    pragma(msg, typeof(Args[1]));
}

@nogc void main() {
    int acc = 0;
    call!(() => acc += 1, "hello");
}

---

As before, if the pragma(msg) is moved before the return statement in `call`,
the program compiles and runs without error.

--

Reply via email to