Bug 21708 – SumType.opEquals gives confusing error message

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-03-13T14:46:06Z
Last change time
2021-03-13T22:28:52Z
Keywords
diagnostic, pull
Assigned to
No Owner
Creator
Paul Backus

Comments

Comment #0 by snarwin+bugzilla — 2021-03-13T14:46:06Z
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`.
Comment #1 by dlang-bot — 2021-03-13T14:51:17Z
@pbackus created dlang/phobos pull request #7858 "Fix Issue 21708 - SumType.opEquals gives confusing error message" fixing this issue: - Fix Issue 21708 - SumType.opEquals gives confusing error message https://github.com/dlang/phobos/pull/7858
Comment #2 by dlang-bot — 2021-03-13T22:28:52Z
dlang/phobos pull request #7858 "Fix Issue 21708 - SumType.opEquals gives confusing error message" was merged into master: - dafbc5c36c509e0095223421f97a4ac964cf7d5a by Paul Backus: Fix Issue 21708 - SumType.opEquals gives confusing error message https://github.com/dlang/phobos/pull/7858