[Issue 22003] New: "Error: unknown, please file report on issues.dlang.org" with SumType/struct mutual recursion
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 8 09:23:35 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22003
Issue ID: 22003
Summary: "Error: unknown, please file report on
issues.dlang.org" with SumType/struct mutual recursion
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P3
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dlang-bugzilla at thecybershadow.net
//////////// test.d ///////////
import std.sumtype;
struct Choice { Node[] nodes; }
struct Seq { Node[] nodes; }
alias Node = SumType!(
Choice,
Seq,
);
///////////////////////////////
Compiler output:
-----------------------------------------------------
Error: unknown, please file report on issues.dlang.org
.../std/sumtype.d(1905): Error: template instance `std.sumtype.SumType!(Choice,
Seq).SumType.get!(Choice)` error instantiating
.../std/meta.d-mixin-794(794): instantiated from here: `F!0LU`
.../std/sumtype.d(1908): instantiated from here: `Map!(getType, 0LU)`
.../std/sumtype.d(1944): instantiated from here: `valueTypes!0LU`
.../std/sumtype.d(1554): ... (1 instantiations, -v to show) ...
.../std/sumtype.d(692): instantiated from here: `match!(SumType!(Choice,
Seq))`
test.d(5): instantiated from here: `SumType!(Choice, Seq)`
.../std/sumtype.d(1962): while evaluating: `static
assert((__error)(hid))`
.../std/sumtype.d(1984): Error: forward reference to inferred return type of
function call `function ()
{
foreach (caseId; 0 .. 2LU)
{
return caseId;
}
assert(0);
}
()`
.../std/sumtype.d(1984): Error: forward reference to inferred return type of
function call `function ()
{
typeof(__error)[] __res104;
foreach (caseId; 0 .. 2LU)
{
__res104 ~= caseId;
}
return __res104;
}
()`
-----------------------------------------------------
--
More information about the Digitalmars-d-bugs
mailing list