http://d.puremagic.com/issues/show_bug.cgi?id=2474
Summary: Recursive lazy arguments are inlined incorrectly Product: D Version: 2.021 Platform: PC OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] This code: --8<----------- int foo(lazy int x) { int bar() { return foo(bar()); } return bar(); } --8<----------- produces the following output when compiled: > dmd inlinebug.d -c -inline inlinebug.d(5): delegate inlinebug.foo.bar.__dgliteral1 is a nested function and cannot be accessed from foo Without the -inline flag this code compiles and works as expected. The same bug is present in DMD 1.037. --