https://issues.dlang.org/show_bug.cgi?id=18850
Issue ID: 18850
Summary: Template overload incorrectly results in recursive
expansion error
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
bug.d
----------------------------
struct Foo(T)
{
alias Foo = Foo!(T, T.init);
}
struct Foo(T, T initialValue)
{
private T value = initialValue;
}
Foo!int n;
----------------------------
> dmd -c file.d
bug.d(3): Error: template instance `Foo!(T, T.init)` recursive template
expansion
bug.d(9): Error: template instance `bug.Foo!int` error instantiating
--