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

           Summary: Function pointers wrongly typed
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: raphael.lond...@gmail.com


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

Hi,

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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to