Method pointers are *function* pointers?? Or delegates??

Mehrdad wfunction at hotmail.com
Fri May 18 11:31:57 PDT 2012


On Friday, 18 May 2012 at 18:30:48 UTC, Andrei Alexandrescu wrote:
> On 5/18/12 1:22 PM, Mehrdad wrote:
>> My brain just exploded.
>> Can someone explain what's going on?
>>
>> class Test
>> {
>> public void foo() { }
>> }
>>
>> static assert(is(typeof(&Test.foo) == void function()));
>
> Looks like a bug. The assert should pass only if foo were 
> static.
>
> Andrei

Okay I'll report it... hopefully it isn't just with my version 
though (a little different from official version).


More information about the Digitalmars-d mailing list