D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15117 - Unreasonable circular reference error via named mixin
Summary: Unreasonable circular reference error via named mixin
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks: 15311
  Show dependency treegraph
 
Reported: 2015-09-25 12:33 UTC by Kenji Hara
Modified: 2016-10-01 11:45 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2015-09-25 12:33:33 UTC
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'
}
Comment 2 github-bugzilla 2016-03-28 05:30:07 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/3c70f276e47c0b0033d7b6c1e2ba281c0f27db28
fix Issue 15117 - Unreasonable circular reference error via named mixin

https://github.com/D-Programming-Language/dmd/commit/d2ee18c7401da4c961a60b19241178f629e3ce84
Merge pull request #5118 from 9rnsr/fix_dotidexp

Issue 15116 & 15117 - fix bugs in DotIdExp.semanticY
Comment 3 github-bugzilla 2016-10-01 11:45:23 UTC
Commits pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/3c70f276e47c0b0033d7b6c1e2ba281c0f27db28
fix Issue 15117 - Unreasonable circular reference error via named mixin

https://github.com/dlang/dmd/commit/d2ee18c7401da4c961a60b19241178f629e3ce84
Merge pull request #5118 from 9rnsr/fix_dotidexp