[Issue 19928] disallow modification of immutable in constructor after calling base ctor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 4 15:58:11 UTC 2019


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

--- Comment #3 from Andrei Alexandrescu <andrei at erdani.com> ---
A solution seems to be disallowing the use of "this" and "this.xyz" (as in
passing as an argument to methods or function) until the object is cooked.
Cooked means all immutable (or otherwise restricted) fields are initialized.

Implications for other qualifiers and combinations need to be analyzed.

--


More information about the Digitalmars-d-bugs mailing list