[Issue 15847] It is not an error to call opAssign on an uninitialized object
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Mar 30 06:26:56 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15847
monkeyworks12 at hotmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |WONTFIX
--- Comment #5 from monkeyworks12 at hotmail.com ---
"It simply isn't possible to detect that the variable is void-initialized in
the general case."
While it could be done reasonably well with flow control analysis, I agree that
it's a lot of work for a small return. Thus it makes more sense to disallow
void initialization for types with a custom opAssign.
"But note that void-initialization is already @system..."
Okay, I forgot this point, and it does mitigate my concerns. I will close this
bug.
--
More information about the Digitalmars-d-bugs
mailing list