On Thursday, 28 April 2016 at 12:41:57 UTC, Basile B. wrote:
On Thursday, 28 April 2016 at 10:21:34 UTC, Andrew Benton wrote:
[...]

This is a common error with mixin template. The static things gets only evaluated once. If you want to be evaluated in each class type you need a true template that get an instance in each class. However the method then **wont be virtual** !!

[...]

Oops actually, type is infered:

void main()
{
    import std.stdio;
    writeln((new Base).writeName); // an UUID
    writeln((new Inheritor).writeName); // test
}

Reply via email to