Bug 12249 – (D1 only) Variadic template argument deduction fails

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2014-02-25T03:23:16Z
Last change time
2019-11-07T08:05:40Z
Keywords
industry, rejects-valid
Assigned to
No Owner
Creator
Mathias Baumann

Comments

Comment #0 by mathias.baumann — 2014-02-25T03:23:16Z
The following code fails: ---------- void foo(int x, T...)(T args) { pragma(msg, T); } void main() { foo!(42)(1, 2, 3); } ---------- with ----- () /d451/f334.d(8): Error: function f334.foo!(42).foo (() args) does not match parameter types (int,int,int) /d451/f334.d(8): Error: expected 0 arguments, not 3 for non-variadic function type void(() args) ----- See also: http://dpaste.dzfl.pl/12257a1a3c11 It works in D2: http://dpaste.dzfl.pl/fb44d9278d44
Comment #1 by razvan.nitu1305 — 2019-11-07T08:05:40Z
This code does not fail with the lastest gut master D2 and D1 is no longer supported. Closing as WORKSFORME