Bug 19172 – Improve betterC assertion error mesage for switch_error

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P4
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-08-16T09:44:35Z
Last change time
2023-01-15T05:08:37Z
Keywords
betterC
Assigned to
No Owner
Creator
Seb
See also
https://issues.dlang.org/show_bug.cgi?id=19087

Comments

Comment #0 by greensunny12 — 2018-08-16T09:44:35Z
See also: https://github.com/dlang/druntime/pull/2274#issuecomment-413480569 tl;dr: In -betterC it's currently hard to do custom formatting and thus a more sophisticated error message still needs to be generated for `switch_error`.
Comment #1 by bugzilla — 2023-01-15T04:36:29Z
I'm not sure what you're asking for. Following the link leads to https://issues.dlang.org/show_bug.cgi?id=19087 which has been marked as fixed. Pending further clarification, I'm going to mark this as resolved.
Comment #2 by alphaglosined — 2023-01-15T05:08:37Z
The problem will be that the file and line arguments would have been ignored. I.e. "No appropriate switch clause found on $FILE:$LINE" would be better than just an assert with the message "No appropriate switch clause found".