Summary: inconsistent behavior with "is a nested function and
                    cannot be accessed from"
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-09-18 23:47:29 PDT ---
The code below fails to compile with:

Error: function!(cast(ModeScore)0,int)!(__lambda33).map!(int[]).map 
is a nested function and cannot be accessed from!(cast(ModeScore)1,int).fun

which is weird.
But then comment out line B or line A (see below) and it works, 
which is even weirder.

Is that a bug?

import std.algorithm;
void main(){
    auto!(a=>!(ModeScore.u));   //line A
    auto!(a=>!(ModeScore.v)); //line B
enum ModeScore {u,v}
auto fun(ModeScore modeScore=ModeScore.sum,T)(T a){
    auto scores=[a].map!(b=>b);
    return 0;

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to