[Issue 704] `class` destructor is called even if constructor throws
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Nov 13 06:11:10 PST 2014
https://issues.dlang.org/show_bug.cgi?id=704
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at yahoo.com
--- Comment #10 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to Gide Nwawudu from comment #3)
> I noticed this issue in my code. I think the problem is that the following
> code should not be allowed.
>
> scope MyClass c; // or auto MyClass c;
> c = new MyClass();
>
> The following code works correctly.
> scope MyClass c = new MyClass();
>
> Maybe the tests should be changed in dstress.
This is the comment where it was reopened, if that helps (I'm with you, I think
this should be closed).
--
More information about the Digitalmars-d-bugs
mailing list