Bug 17863 – cannot deduce function with implicit conversion
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-09-28T10:38:09Z
Last change time
2018-06-14T13:47:24Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
anonymous4
Comments
Comment #0 by dfj1esp02 — 2017-09-28T10:38:09Z
void f1(T)(const T a){} //works
void f2(T)(immutable T a){} //doesn't work
void f3(T)(shared T a){} //doesn't work
void g(){ f1(0); f2(0); f3(0); }
Comment #1 by dfj1esp02 — 2017-09-28T10:52:22Z
Error: template f2 cannot deduce function from argument types !()(int), candidates are:
f2(T)(immutable T a)
Error: template f3 cannot deduce function from argument types !()(int), candidates are:
f3(T)(shared T a)
Comment #2 by razvan.nitu1305 — 2018-06-14T13:47:24Z
The example compiles successfully now on master git HEAD. Closing as fixed.