[Issue 2735] New: Can't assign ref function to function pointer
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Mar 15 09:38:24 PDT 2009
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: bugzilla at digitalmars.com
ReportedBy: jlquinn at optonline.net
ref int c() { static int a=2; return a; }
int function() d = &c;
fails to compile:
jlquinn at 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()
--
More information about the Digitalmars-d-bugs
mailing list