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)
Comment #1 by hoganmeier — 2011-10-18T07:16:14Z
Introduced in 2f37b7d according to git bisect.
Comment #2 by k.hara.pg — 2011-10-21T03:42:20Z
> 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
Comment #3 by bugzilla — 2011-10-23T12:45:05Z