[Issue 15117] New: Unreasonable circular reference error via named mixin
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Sep 25 05:33:33 PDT 2015
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: nobody at puremagic.com
Reporter: k.hara.pg at 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'
}
--
More information about the Digitalmars-d-bugs
mailing list