Voldemort Types in D
Jacob Carlborg
doob at me.com
Wed May 9 13:17:21 PDT 2012
On 2012-05-09 16:30, Andrei Alexandrescu wrote:
> http://www.reddit.com/r/programming/comments/telhj/voldemort_types_in_d/
>
> Andrei
D also have some problems with voldemort types. As can be seen in a
discussion in the main newsgroup, it's not possible to declare a
function pointer which returns by reference.
ref int function () bar;
test.d(8): Error: variable test.bar only parameters or foreach
declarations can be ref
Then if we try place "ref" after "function" we get another error.
int function ref () bar;
test.d(8): found 'ref' when expecting '('
test.d(8): basic type expected, not (
test.d(8): function declaration without return type. (Note that
constructors are always named 'this')
test.d(8): found 'bar' when expecting ')'
test.d(8): no identifier for declarator int function(int())
--
/Jacob Carlborg
More information about the Digitalmars-d-announce
mailing list