Comment #0 by default_357-line — 2022-01-31T15:34:27Z
Consider the following code:
```
template foo(T) {
U foo(U : T)() { return T.init; }
}
float bar(U : float)() { return 0.0f; }
alias bar = foo!int;
void main() {
assert(bar!int == 0);
}
```
Ie. template function bar is overloaded with an alias to foo's instance foo!int, which is itself a template function.
This results in:
onlineapp.d(6): Error: template instance `foo!int` `foo!int` forward references template declaration `foo(T)`
onlineapp.d(6): Error: alias `onlineapp.bar` conflicts with template `onlineapp.bar(U : float)()` at onlineapp.d(5)
Note that this works fine if foo is just a function, or if `alias bar` is moved before `float bar`.