[Issue 23916] Non-eponymous template instances have a "type" (void)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 13 10:32:57 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23916

--- Comment #3 from Nick Treleaven <nick at geany.org> ---
> Any reason not to revise and deprecate this?

It would break code like this:

import std.stdio;

template t()
{
        int i;
}

void f(alias a)() if (is(typeof(a)))
{
        writeln(a.i);
}

void main()
{
        alias a = t!();
        f!a();
}

--


More information about the Digitalmars-d-bugs mailing list