Comment #0 by snarwin+bugzilla — 2021-07-07T19:44:59Z
As of DMD 2.097.0, the following program fails to compile:
---
template Outer(T)
{
struct Inner {}
}
void func(T)(Outer!T.Inner) {}
void main()
{
Outer!int.Inner arg;
func(arg); // error;
}
---
The error message is:
---
onlineapp.d(11): Error: template `onlineapp.func` cannot deduce function from argument types `!()(Inner)`, candidates are:
onlineapp.d(6): `func(T)(Outer!T.Inner)`
---
If the call to `func` is changed to `func!int(arg)`, compilation succeeds.
Pattern-matching of types in `is()` expressions is also affected by this issue:
---
static assert(is(typeof(arg) == Outer!int.Inner)); // pass
static assert(is(typeof(arg) == Outer!T.Inner, T)); // fail
---
Comment #1 by robert.schadek — 2024-12-13T19:17:33Z