[Issue 6825] New: Address of templated method incorrectly taken
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue Oct 18 06:37:42 PDT 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=6825
           Summary: Address of templated method incorrectly taken
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: mrmocool at gmx.de
--- Comment #0 from Trass3r <mrmocool at gmx.de> 2011-10-18 06:36:44 PDT ---
This worked in 2.055 but not with git dmd:
struct File
{
    void write(S...)(S args)
    {
    }
}
void dump(void delegate(string) d)
{
}
void save()
{
    auto o = File();
    dump(&o.write!string);
}
$ dmd test.d
DMD v2.056 DEBUG
dustmite.d(15): Error: expected 1 function arguments, not 0
dustmite.d(15): Error: o.write() is not an lvalue
dustmite.d(15): Error: function dustmite.dump (void delegate(string) d) is not
callable using argument types (void*)
dustmite.d(15): Error: cannot implicitly convert expression (&o.write()) of
type void* to void delegate(string)
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list