[Issue 23164] [REG 2.097] Infinite loop on assertion failure + DMD moves struct with copy constructor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 8 02:19:40 UTC 2022


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

--- Comment #2 from Walter Bright <bugzilla at 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

--


More information about the Digitalmars-d-bugs mailing list