[Issue 13378] New: Wrong failure of template value parameter deduction in IFTI
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Aug 25 19:11:18 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13378
Issue ID: 13378
Summary: Wrong failure of template value parameter deduction in
IFTI
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: rejects-valid
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: k.hara.pg at gmail.com
From: http://forum.dlang.org/thread/bduqdtfxjmlswksytbvh@forum.dlang.org
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
--
More information about the Digitalmars-d-bugs
mailing list