[Issue 7032] OpAssign is not called when this(this) is disabled

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Feb 9 05:40:59 PST 2016


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

Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
OpAssign never work when a variable is initialized. In this line:

>	Fail b = a;

'b' is yet not born, but opAssign needs a living 'this' instance. Therefore,
the variable 'b' initialization with an lvalue 'a' always tries to copy 'a',
then rejected by @disable this(this).

--


More information about the Digitalmars-d-bugs mailing list