Bug 6825 – Regression(2.055+): Address of templated method incorrectly taken
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2011-10-18T06:36:00Z
Last change time
2015-06-09T05:11:52Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
hoganmeier
Comments
Comment #0 by hoganmeier — 2011-10-18T06:36:44Z
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)