cat > bug.d << CODE struct Bar(T) {} template Foo26(T:Bar!(const T)) { pragma(msg, "const", T); } template Foo26(T:Bar!(T)) { pragma(msg, "mod", T); } void main() { alias Foo26!(Bar!int) foo; } CODE dmd -c bug -------- I'm not sure whether Bar!int should match Bar!(const T) in the first place. However if it does it must be a MATCHconst.
The error is: > tempspecconst.d(14): Error: template `tempspecconst.Foo26` matches more than one template declaration: > I'm not sure whether Bar!int should match Bar!(const T) in the first place. Well this fails so I'd say no: Bar!int b; Bar!(const int) c = b;
With only the top overload present, the code compiles even though the argument is `Bar!int`, not `Bar!(const int)`: > template Foo26(T:Bar!(const T))
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18424 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB