www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6825] New: Address of templated method incorrectly taken

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: mrmocool gmx.de



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: -------
Oct 18 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6825


Trass3r <mrmocool gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Address of templated method |Regression(2.055+): Address
                   |incorrectly taken           |of templated method
                   |                            |incorrectly taken



Introduced in 2f37b7d according to git bisect.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 18 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6825


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch



 Introduced in 2f37b7d according to git bisect.
It is a bug of TemplateInstance::needsTypeInference that surfaced by that commit. https://github.com/D-Programming-Language/dmd/pull/465 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 21 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6825


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



12:45:05 PDT ---
https://github.com/D-Programming-Language/dmd/commit/9845d16592d057d11cbebf5a5be705f7f8051c2a

https://github.com/D-Programming-Language/dmd/commit/deb82d39d12b325118372c1cf8c7634c0597e43e

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 23 2011