Bug 2204 – const IFTI fails sometimes with more than one parameter

Status
RESOLVED
Resolution
DUPLICATE
Severity
blocker
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2008-07-08T13:23:00Z
Last change time
2015-06-09T01:19:35Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
schveiguy
Blocks
2267

Comments

Comment #0 by schveiguy — 2008-07-08T13:23:34Z
Given the code const(T)[] f(T)(const(T)[] v1, const(T)[] v2){return v1;} const(T)[] f2(T)(const(T)[] v1){return v1;} void main() { char[] a, b; const(char)[] a2, b2; f(a, b); // OK f(a2, b2); // Error (see below) f2(a); // OK f2(a2); // OK } the error that is encountered on f(a2, b2) is: testconst.d(9): template testconst.f(T) does not match any function template declaration testconst.d(9): template testconst.f(T) cannot deduce template function from argument types !()(const(char)[],const(char)[]) This also appears to fail on 2.008 and 2.012
Comment #1 by schveiguy — 2008-07-08T13:26:24Z
Forgot to mention. This worked on 2.007
Comment #2 by benoit — 2008-07-28T16:49:17Z
This one is actually blocking development of the tango D2 branch.
Comment #3 by bugzilla — 2008-08-13T17:21:10Z
*** This bug has been marked as a duplicate of 1644 ***