[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 23 04:35:33 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=16107
--- Comment #8 from Mike Franklin <slavo5150 at yahoo.com> ---
> 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
--
More information about the Digitalmars-d-bugs
mailing list