[Issue 3072] tuples can't be aliases ( except when the aliases are templates. )

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Feb 22 20:55:29 PST 2015


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

--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> ---
With 1.076, the OP code in comment#0 compiles successfully.

And with 2.067a, dmd accepts the following code.

import std.stdio;

template Ta(alias t){ void Tfn() { writeln(t); } }
template Tt(t...)   { void Tfn() { writeln(t); } }

struct S
{
    int i; int j; int k;
    mixin Ta!(i);    // passes
    mixin Tt!(i,j);  // also passes
}

Therefore the original issue is already fixed in D1 and D2.

--


More information about the Digitalmars-d-bugs mailing list