Bug 11855 – Explicit template instantiation with opDispatch fails to compile

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-01T04:01:53Z
Last change time
2024-12-13T18:15:31Z
Assigned to
No Owner
Creator
Jacob Carlborg
Moved to GitHub: dmd#18745 →

Comments

Comment #0 by doob — 2014-01-01T04:01:53Z
The following code fails to compile: struct Foo { void opDispatch (string name, T) () { } } void main () { Foo foo; foo.bar!(int); } The error message is: Error: no property 'bar' for type 'Foo'
Comment #1 by yuriy.glukhov — 2014-04-16T15:30:48Z
Seems like it should be done in the following way (though still does not work with the same error): struct Foo { template opDispatch(string name) { void opDispatch (T) () { } } }
Comment #2 by robert.schadek — 2024-12-13T18:15:31Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18745 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB