Bug 7366 – IFTI fails to consider bounds-checked implicit conversions for non-deduced parameter types

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-24T19:49:00Z
Last change time
2012-07-10T08:38:27Z
Keywords
rejects-valid
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2012-01-24T19:49:57Z
With DMD 2.058head: auto foo(T1)(T1 x){} auto foo(T1,T2)(T1 x,T2 y){} void main(){foo!(ubyte)(0);} Error: template tt.foo(T1) does not match any function template declaration Error: template tt.foo(T1) cannot deduce template function from argument types !(ubyte)(int) Error: template instance foo!(ubyte) errors instantiating template The following works (showing that the first error message is nonsensical): auto foo(T1)(T1 x){} void main(){foo!(ubyte)(0);}
Comment #1 by timon.gehr — 2012-03-19T02:44:53Z
Simpler test case: void foo()(byte k){} void main(){foo(2);}
Comment #2 by clugdbug — 2012-03-19T03:09:39Z
Looks like a duplicate of regression bug 4953.
Comment #3 by yebblies — 2012-07-10T08:38:27Z
*** This issue has been marked as a duplicate of issue 4953 ***