Summary: An array()/map inlining problem
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 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:
------- You are receiving this mail because: -------

Reply via email to