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

           Summary: Can't assign ref function to function pointer
           Product: D
           Version: 2.025
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzi...@digitalmars.com
        ReportedBy: jlqu...@optonline.net


ref int c() { static int a=2; return a; }
int function() d = &c;

fails to compile:

jlqu...@naga:~/d$ ~/dmd/linux/bin/dmd -v  -c decl1.d 
parse     decl1
semantic  decl1
import    object       
(/home/jlquinn/dmd/linux/bin/../../src/druntime/import/object.di)
semantic2 decl1
decl1.d(2): Error: cannot implicitly convert expression (& c) of type int
function() ref to int function()


-- 

Reply via email to