(In reply to Jonathan Marler from comment #0)
> alias Foo = Foo!(T, T.init);
Just that line alone shows the same behavior. And that might make it more obvious what's happening: In the struct body, "Foo" refers to the alias, not the templates.
You can refer to the templates with `.Foo`:
----
struct Foo(T)
{
alias Foo = .Foo!(T, T.init);
}
struct Foo(T, T initialValue)
{
private T value = initialValue;
}
Foo!int n;
----
Comment #2 by johnnymarler — 2018-05-14T15:52:00Z
Yes I made a mistake here. Had a temporary brain lapse. I mean to define Foo as a template, not a templated struct.