[Issue 21708] New: SumType.opEquals gives confusing error message
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 13 14:46:06 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21708
Issue ID: 21708
Summary: SumType.opEquals gives confusing error message
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: snarwin+bugzilla at gmail.com
Example code:
---
SumType!int x;
x == 123;
---
Error message:
---
src/sumtype.d(587,11): Error: void has no value
src/sumtype.d(587,39): Error: void has no value
---
This is confusing, because the actual error is that it is not valid to compare
a `SumType!int` with an `int`.
--
More information about the Digitalmars-d-bugs
mailing list