http://d.puremagic.com/issues/show_bug.cgi?id=2474
[EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[EMAIL PROTECTED] Version|2.021 |1.036 ------- Comment #1 from [EMAIL PROTECTED] 2008-11-27 09:42 ------- >> dmd inlinebug.d -c -inline > inlinebug.d(5): delegate inlinebug.foo.bar.__dgliteral1 is a nested function > and cannot be accessed from foo Presumably, inlining changes return bar(); to return foo(bar()); after which it tries to TRO the foo call, but gets mixed up as it relies on the nested function bar. I'm not sure if the compiler is actually within its rights to complain about this, as it's bad code even though not technically illegal. And if such bad code interferes with optimisation, should the compiler error or just not bother with the optimisation? > Without the -inline flag this code compiles and works as expected. As in throws a stack overflow? > The same bug is present in DMD 1.037. And 1.036 and 2.020. AIUI if the same bug occurs in both D1 and D2, it is preferred to file it under the D1 version. --