[Issue 704] destructors are called even if the constructor throws an exception

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 16 04:05:52 PST 2009


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


gide at nwawudu.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |




------- Comment #3 from gide at nwawudu.com  2009-01-16 06:05 -------
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.


-- 



More information about the Digitalmars-d-bugs mailing list