https://issues.dlang.org/show_bug.cgi?id=16107
--- Comment #8 from Mike Franklin <[email protected]> --- > import std.stdio, std.traits; > > struct TreeItemChildren(T){} > > struct TreeItemSiblings(T){} > > class Foo > { > alias TreeItemType = typeof(this); > > TreeItemSiblings!TreeItemType _siblings; // remove this decl > TreeItemChildren!TreeItemType _children; // or this one : OK > } > > template Bug(T) > { > bool check() > { > bool result; > import std.meta: aliasSeqOf; > import std.range: iota; > > foreach(i; aliasSeqOf!(iota(0, T.tupleof.length))) > { > alias MT = typeof(T.tupleof[i]); > static if (is(MT == struct)) > result |= Bug!MT; // result = result | ... : OK > if (result) break; // remove this line : OK > > } > return result; > } > enum Bug = check(); > } > > void main() > { > assert(!Bug!Foo); > } According to https://run.dlang.io/is/kosY23, this has been fixed since 2.070.2 --
