[Issue 14818] New: Unhelpful "does not match template overload set" error
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Jul 21 08:32:03 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14818
Issue ID: 14818
Summary: Unhelpful "does not match template overload set" error
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: diagnostic
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: k.hara.pg at gmail.com
Following incorrect program:
template Foo(T) if (is(T == int)) {}
template Bar(T) if (is(T == double)) {}
template Mix1() { alias X = Foo; }
template Mix2() { alias X = Bar; }
mixin Mix1;
mixin Mix2;
// in here, X is an OverloadSet
void main()
{
// Neither Foo nor Bar match
alias x = X!string; // line 13
}
Reports:
test.d(13): Error: template instance test.X!string does not match template
overload set Bar
The diagnostic is not helpful. It should be:
test.d(13): Error: template instance test.X!string does not match template
overload set X
--
More information about the Digitalmars-d-bugs
mailing list