[Issue 21035] wrong code when uses struct's methods of .init value

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 13 14:44:52 UTC 2021


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

kinke <kinke at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|accepts-invalid             |backend
                 CC|                            |kinke at gmx.net

--- Comment #7 from kinke <kinke at gmx.net> ---
I don't see where this would be invalid - `CNB.init` is a new rvalue (analogous
to `CNB()`), `append` returns it as lvalue (allowed IIRC for DotIdExpressions),
and then its `data` buffer is copied to the `id` local. Works fine with LDC.

--


More information about the Digitalmars-d-bugs mailing list