cat > bug.d << CODE void foo(alias pred)() { } void bar() { foo!(a => a + 1)(); } CODE dmd -H -o- -c bug -------- The lambda template is not emitted and leaving the header with an unknown symbol. foo!(__lambda2)();
With 2.064 git-head, void foo(alias pred)() { } void bar()() // Make template to output function body in di file { foo!(a => a + 1)(); } dmd -H -o- test.d Outputs: // D import file generated from 'test.d' template foo(alias pred) { void foo() { } } template bar() { void bar() { foo!((a) => a + 1)(); // correct } }