[Issue 5828] New: Cannot declare a variable of type "X function() ref" without auto
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 10 01:20:16 PDT 2011
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: nobody at puremagic.com
ReportedBy: timon.gehr at gmx.ch
--- Comment #0 from timon.gehr at 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: -------
More information about the Digitalmars-d-bugs
mailing list