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

           Summary: Bad codegen when using templates with a named mixin as
                    a parameter
           Product: D
           Version: 2.031
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: 2kor...@gmail.com


template Magic()
{
    int magic;
}

struct Item
{
    mixin Magic A;
}

struct Foo(alias S)
{
}

void main()
{
    Item* i1 = new Item;
    Item* i2 = new Item;

    Foo!(Item.A) bar; // comment-out this line for a successful run

    assert(i2.A.magic == 0);
    i1.A.magic = 42;
    assert(i2.A.magic == 0);
}

core.exception.asserter...@test.d(24): Assertion failure

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to