Bug 22860 – `Error: unknown` with mutually recursive and nested SumType

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-03-08T06:13:31Z
Last change time
2022-03-27T02:24:32Z
Keywords
pull
Assigned to
No Owner
Creator
Tomoya Tanjo

Comments

Comment #0 by ttanjo — 2022-03-08T06:13:31Z
The following code works with dmd 2.098.1 but does not work with dmd 2.099.0 (beta). ```d 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: ```console > 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 ```
Comment #1 by dlang-bot — 2022-03-18T14:24:44Z
@ibuclaw updated dlang/dmd pull request #13839 "fix Issue 22859 - Error: forward reference of variable 'isAssignable' for mutually recursed 'allSatisfy'" fixing this issue: - fix Issue 22860 - 'Error: unknown' with mutually recursive and nested SumType https://github.com/dlang/dmd/pull/13839
Comment #2 by dlang-bot — 2022-03-18T15:59:13Z
dlang/dmd pull request #13839 "fix Issue 22859 - Error: forward reference of variable 'isAssignable' for mutually recursed 'allSatisfy'" was merged into stable: - 4bbb338308245de1755b67c5e28d95a251504061 by Iain Buclaw: fix Issue 22860 - 'Error: unknown' with mutually recursive and nested SumType https://github.com/dlang/dmd/pull/13839
Comment #3 by dlang-bot — 2022-03-27T02:24:32Z
dlang/dmd pull request #13892 "Merge stable into master" was merged into master: - 2a215e0c3693cbfa50c43515459571b163c1bad1 by Iain Buclaw: fix Issue 22860 - 'Error: unknown' with mutually recursive and nested SumType https://github.com/dlang/dmd/pull/13892