https://issues.dlang.org/show_bug.cgi?id=14454
Issue ID: 14454 Summary: Lambda template param doesn't compile with -inline "*** is a nested function and cannot be accessed from ***" Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: minor Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: dzug...@gmail.com class Boo(alias func) {} class Foo { final auto Try() { return new Boo!((x) { return x; })(); } } void main() { auto a = new Foo().Try(); } "dmd main.d" works, "dmd -inline main.d" doesn't with "main.d(7): Error: function main.Foo.Try is a nested function and cannot be accessed from D main". v.2.067. The culprit is the lambda param, using normal function works. Using "return new Boo!(function int(int x) { return x; })();" works too. Using "return new Boo!(function (x) { return x; })();" doesn't work. --