http://d.puremagic.com/issues/show_bug.cgi?id=4841
Summary: An array()/map inlining problem Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2010-09-08 04:08:00 PDT --- This is a D2 program: import std.algorithm: map; import std.array: array; void main() { int c; array(map!((x){return c;})([1])); } It works if you compile it with dmd 2.048 with: dmd test.d But if use inlining: dmd -inline test.d It doesn't compile and dmd returns: test.d(5): Error: function D main is a nested function and cannot be accessed from array I think this is a compiler bug because inlining should not affect the compilability of a program. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------