In continuation to https://issues.dlang.org/show_bug.cgi?id=16540, these are still buggy:
void foo(scope lazy int* f) @nogc {}
void vararg_foo(Args...)(scope lazy Args args) @nogc {}
// Compiles fine
void bar1() @nogc { foo(new int(5)); }
// Incorrectly fails!
void bar2() @nogc {
int* f() { return new int(5); }
foo(f()); // f() should not be called here!
}
// Incorrectly fails!
void bar3(scope lazy int* x) @nogc {
vararg_foo(x); // x should not be evaluated here!
}