http://d.puremagic.com/issues/show_bug.cgi?id=5828

           Summary: Cannot declare a variable of type "X function() ref"
                    without auto
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: timon.g...@gmx.ch


--- Comment #0 from timon.g...@gmx.ch 2011-04-10 01:16:36 PDT ---
DMD rejects explicit declarations of variables of type "X function() ref",
while internally this is a valid type:

int a;
ref int g(){return a;}

int main(){
    //ref int function() f=&g; //error
    //int function ref() f=&g; //error
    auto f=&g; //ok
    writeln(typeof(f).stringof); //"int function() ref"
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to