Bug 756 – IFTI for tuples only works if tuple parameter is last

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2006-12-27T15:06:00Z
Last change time
2014-02-15T13:18:35Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
kamm-removethis
Blocks
1856

Comments

Comment #0 by kamm-removethis — 2006-12-27T15:06:10Z
The spec does not seem to require that tuple parameters are the last parameter in the list, but this doesn't work: void foo(U...)(int t, U u) { } void bar(U...)(U u, int t) { } void main() { foo(1, 2, 3); // Ok, IFTI works bar(1, 2, 3); // error: cannot deduce template function from argument types (int,int,int) bar!(int, int)(1, 2, 3); // Ok. }
Comment #1 by thomas-dloop — 2007-01-01T10:35:43Z
This seems to be a root cause for quite a few recent bug reports. Added to DStress as http://dstress.kuehne.cn/run/t/tuple_13_A.d http://dstress.kuehne.cn/run/t/tuple_13_B.d http://dstress.kuehne.cn/run/t/tuple_13_C.d
Comment #2 by smjg — 2007-09-18T16:22:59Z
Please remember to assign keywords to bug reports. To everybody reading this: Please look through issues you've reported and check for missing keywords.
Comment #3 by bugzilla — 2008-03-07T00:19:59Z
Fixed dmd 1.028 and 2.012