[Issue 23733] Can't use template type parameter as type of alias parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 15 19:12:27 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23733
--- Comment #4 from Paul Backus <snarwin+bugzilla at gmail.com> ---
Worth noting that this error is specific to alias parameters. If the example is
changed to use a template value parameter, it compiles successfully:
---
template foo(T, T t) {}
alias _ = foo!(int, 0); // ok
---
So, it seems to me that referring to an earlier template parameter in a later
parameter's declaration is something that's intended to work in general, and
the fact that it doesn't work for alias parameters is indeed a bug.
--
More information about the Digitalmars-d-bugs
mailing list