www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22860] New: `Error: unknown` with mutually recursive and


          Issue ID: 22860
           Summary: `Error: unknown` with mutually recursive and nested
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: ttanjo gmail.com

The following code works with dmd 2.098.1 but does not work with dmd 2.099.0

import std.sumtype : SumType;

struct None{}

class C1
    SumType!(C1, C2) field;

class C2
    SumType!(None, SumType!(C1, C2)[]) field;

void main() {}

dmd 2.099.0 shows the following message:
 rdmd playground.d
Error: unknown, please file report on issues.dlang.org onlineapp.d(7): Error: template instance `std.sumtype.SumType!(C1, C2)` error instantiating ``` --
Mar 07 2022