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





------- Comment #1 from jarrett.billings...@gmail.com  2009-03-15 12:11 -------
I suppose it should be mentioned that it's not possible to declare a ref
function pointer, or else this would be a no-brainer:

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

foo.d(8): variable foo.d only parameters or foreach declarations can be ref

Type inference, however, is able to figure it out:

ref int c() { static int a=2; return a; }
auto d = &c; // whee


-- 

Reply via email to