[Issue 23669] [DIP1000] Compound assignment to length of slice member variable in scope method fails

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 4 05:05:14 UTC 2023


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

--- Comment #1 from Paul Backus <snarwin+bugzilla at gmail.com> ---
The error is caused by the way DMD lowers `a.length += 1;`, which can be seen
using the -vcg-ast switch:

---
(string[]* __arraylength2 = &this.a;) , _d_arraysetlengthT(*__arraylength2,
(*__arraylength2).length + 1LU);
---

--


More information about the Digitalmars-d-bugs mailing list