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

--- Comment #2 from Walter Bright <bugzi...@digitalmars.com> ---
If I add @safe and compile with -preview=dip1000, I get:

test23164.d(15): Error: address of variable `this` assigned to `this` with
longer lifetime
test23164.d(22): Error: address of variable `this` assigned to `this` with
longer lifetime

Line 15 is: this.ptr = &this; in the constructor

Line 22 is: this.ptr = &this; in the copy constructor

--

Reply via email to