Omittable parens is an evil
Koroskin Denis
2korden at gmail.com
Sat Jul 19 16:40:04 PDT 2008
On Sun, 20 Jul 2008 01:26:53 +0400, Manfred_Nowak <svv1999 at hotmail.com>
wrote:
> Koroskin Denis wrote:
>
>> writefln((&Test.test).mangleof); // prints PFZv, which is a
>> pointer to function
>>
>
> Whre is the bug?
>
> writefln( typeof( Test.test).stringof);
> writefln( typeof( Test.test).mangleof);
> writefln( typeof( Test.test()).stringof);
> writefln( typeof( Test.test()).mangleof);
>
> prints
>
> (void())()
> v
> void
> v
>
> -manfred
>
I expected to get `FZv' or, better, `_D4test4Test4testMFZv' and not `v'
nor `(void())()'.
The only way I have found so far is to strip the function body and analyze
compiler error message:
Error 42: Symbol Undefined _D4test4Test4testMFZv
More information about the Digitalmars-d
mailing list