http://d.puremagic.com/issues/show_bug.cgi?id=1659





------- Comment #2 from g...@nwawudu.com  2009-04-03 16:04 -------
Including original attachment in this comments. Issue looks similar to BUG 918.

import std.stdio;

typedef char ctd;
class Foo { }
class Bar : Foo { }

void main()
{
    Baz!(char)(); /* regular template version used only because
                   * template alias parameters reject basic types. */
    Baz!(ctd)(); // alias version used
    Baz!(Foo)(); // Foo version used
    Baz!(Bar)(); // alias version used
}

void Baz(T)()
{
    writefln("regular template version called with ", T.stringof);
}

void Baz(T : Foo)()
{
    writefln("foo specialization called with ", T.stringof);
}

void Baz(alias T)()
{
    writefln("alias version called with ", T.stringof);
}


-- 

Reply via email to