Summary: Function pointers wrongly typed
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Raphael Londeix <> 2011-05-12 
02:36:22 PDT ---
Created an attachment (id=967)
full example to reproduce


When using auto, the wrong type is infered from the expression &Class.method. I
have to fully specify the type. However, even when I do that, the typeid does
not include any information of the argument type (which is Class).

Class a;

auto f = &Class.method; // void()*
f(); // Segfault, imho it's normal
f(a); // compile error

void function(Class) f2 = &Class.method; // Still void()* !
f2(a); // fine :)

See snippet for full example :)

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to