Bug 13378 – Wrong failure of template value parameter deduction in IFTI
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-08-26T02:11:00Z
Last change time
2014-09-02T02:14:22Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2014-08-26T02:11:18Z
From: http://forum.dlang.org/thread/[email protected]
This code works with 2.065, but fails with 2.066.
------
struct Vec(size_t n, T, string as)
{
T[n] data;
}
void doSome(size_t n, T, string as)(Vec!(n,T,as) v) {}
void main()
{
auto v = Vec!(3, float, "xyz")([1,2,3]);
doSome(v);
}
------
test.d(6): Error: template test.doSome(uint N, T, string AS)(Vec!(N, T, AS) v) specialization not allowed for deduced parameter AS
Introduced in: https://github.com/D-Programming-Language/dmd/pull/3536