[Issue 17055] this(...) hides this() of mixed in template

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jan 21 01:43:54 PST 2017


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

--- Comment #3 from Ralph Alexander Bariz <ralph.bariz at gmail.com> ---
//////////////////////////////////////////////////////////
mixin template Foo()
{
    int x;

    this()
    {
        this.x=5;
    }
}

class Bar
{
    mixin Foo;
}

void main()
{
    import std.stdio;

    auto a = new Bar();
    writeln(a.x);
}
//////////////////////////////////////////////////////////

is building fine

--


More information about the Digitalmars-d-bugs mailing list