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

Basile-z <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
                 CC|                            |[email protected]
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--- Comment #1 from Basile-z <[email protected]> ---
Somewhat reduced:

---
import std.traits;

struct Array(T)
{
    static if (hasIndirections!T) {}
}

struct Foo { Array!Bar _barA; }
struct Bar { Frop _frop; }
class Frop { Array!Foo _foos; }
---

The problem is caused by the call to `hasIndirections` and to a nested call to
`isDynamicArray`.

changing the `isDynamiArray` implementation from:

  enum bool isDynamicArray(T) = is(DynamicArrayTypeOf!T) && !isAggregateType!T;

to

  enum isDynamicArray(T) = !isAggregateType!T && is(DynamicArrayTypeOf!T);


allows to compile without error but without really fixing the root of the
problem, which seems to reside in `DynamicArrayTypeOf`.

--

Reply via email to