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

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       
semantic2 decl1
decl1.d(2): Error: cannot implicitly convert expression (& c) of type int
function() ref to int function()


Reply via email to