Thread overview
[Issue 6825] New: Address of templated method incorrectly taken
Oct 18, 2011
Trass3r
[Issue 6825] Regression(2.055+): Address of templated method incorrectly taken
Oct 18, 2011
Trass3r
Oct 21, 2011
Kenji Hara
Oct 23, 2011
Walter Bright
October 18, 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@puremagic.com
        ReportedBy: mrmocool@gmx.de


--- Comment #0 from Trass3r <mrmocool@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: -------
October 18, 2011
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


--- Comment #1 from Trass3r <mrmocool@gmx.de> 2011-10-18 07:16:14 PDT ---
Introduced in 2f37b7d according to git bisect.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 21, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6825


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

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


--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2011-10-21 03:42:20 PDT ---
> 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: -------
October 23, 2011
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


--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> 2011-10-23 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: -------