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

          Issue ID: 15117
           Summary: Unreasonable circular reference error via named mixin
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: k.hara...@gmail.com

Test case:

template Mix()
{
    int y = { S* s; return s ? s.mix.y : 0; }();
}

struct S
{
    int x = { S* s; return s ? s.x : 0; }();    // OK

    mixin Mix mix;  // bug, Error: circular reference to 'y'
}

--

Reply via email to