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

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 756 - IFTI for tuples only works if tuple parameter is last
Summary: IFTI for tuples only works if tuple parameter is last
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 All
: P2 normal
Assignee: Walter Bright
URL:
Keywords: rejects-valid
Depends on:
Blocks: 1856
Show dependency tree / graph
Reported: 2006年12月27日 15:06 UTC by Christian Kamm
Modified: 2014年02月15日 13:18 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Christian Kamm 2006年12月27日 15:06:10 UTC
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 Thomas Kühne 2007年01月01日 10:35:43 UTC
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 Stewart Gordon 2007年09月18日 16:22:59 UTC
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 Walter Bright 2008年03月07日 00:19:59 UTC
Fixed dmd 1.028 and 2.012


AltStyle によって変換されたページ (->オリジナル) /