https://issues.dlang.org/show_bug.cgi?id=11826
--- Comment #4 from [email protected] --- Actually, the parameter to f() doesn't have to be an array: ------ struct S(alias fun) { auto g() { return fun(0); } } auto f(int arr) { return S!(a => arr)(); } auto r = f(2); void main() { r.g(); } ------ This seems to prove conclusively that the problem is caused by the lambda trying to access the out-of-scope stack frame of f(). --
