[Issue 22859] Error: forward reference of variable `isAssignableTo` for mutually recursed SumType

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 15 06:29:30 UTC 2022


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

--- Comment #1 from Tomoya Tanjo <ttanjo at gmail.com> ---
I reduced the code as follows.

It uses `allSatisfy` and `isAssignable` but they are not changed since
v2.098.1.
It seems that the source of the problem is in dmd rather than phobos or
druntime.

run.dlang.io: https://run.dlang.io/is/ZPTIcH


```d
import core.internal.traits : allSatisfy, isAssignable;

struct None{}

class C1
{
    static if(allSatisfy!(isAssignable, None, C2)) {}
}

class C2
{
    static if(allSatisfy!(isAssignable, None, C1, C2)) {}
}

void main() {}
```

--


More information about the Digitalmars-d-bugs mailing list