http://d.puremagic.com/issues/show_bug.cgi?id=10789



--- Comment #8 from Kenji Hara <k.hara...@gmail.com> 2013-09-29 08:36:03 PDT ---
(In reply to comment #7)
> The original test case still fails on DMD HEAD:
> 
> ---
> 0018FD74 this() 0
> 0018FD75 this(this) 1
> 0018FD74 ~this() 2
> 0018FD9C ~this() 1
> core.exception.AssertError@app(47): Assertion failure
> ---
> 
> This is due to the last destructor running on an uninitialized instance
> (initialized == false).

To me it looks like that the original test case contains a bug.

In S.this(this), `initialized` field is incorrectly set to false. It will stop
to decrement S.count at the destruction of the copied objects. Therefore the
last assertion in main fails because S.count == 1.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to