[Issue 20358] External initialization of private struct fields should be disallowed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 6 09:28:40 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=20358

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305 at gmail.com

--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
This issue is invalid. Default constructor is allowed to initialize private
fields, otherwise you would end up with partially initialized objects. If this
behavior does not suit you, you can disable the default constructor.

I suggest closing this as invalid.

--


More information about the Digitalmars-d-bugs mailing list