[Issue 15936] misleading error message about @disable where there is none
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 7 10:50:20 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=15936
RazvanN <razvan.nitu1305 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |razvan.nitu1305 at gmail.com
Resolution|--- |WORKSFORME
--- Comment #2 from RazvanN <razvan.nitu1305 at gmail.com> ---
The error message has improved:
test.d(15): Error: generated function `test.RAMNode.opAssign` cannot be used
because it is annotated with `@disable`
Since the error happens in generated code, the compiler does not output it.
This makes sense as the user cannot directly modify generated code. So it just
informs that the generated code has failed. Ideally, the compiler would point
out an actionable item for the user to fix the breakage, however, currently the
rudimentary error handling in dmd does not allow for that.
Closing as WORKSFORME.
--
More information about the Digitalmars-d-bugs
mailing list