www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2184] New: Class Invariants not called

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2184

           Summary: Class Invariants not called
           Product: D
           Version: 1.030
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: gim913 gmail.com


If there is no ctor defined (e.g. default one is called) class invariant is not
called.


-- 
Jun 28 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2184





------- Comment #1 from gim913 gmail.com  2008-06-28 19:03 -------
Created an attachment (id=261)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=261&action=view)
Testcase

compiled gives following result:

before test
tango.core.Exception.AssertException t05_invariant.d(12): classinvariantcalled

after removing comment on line 8 it throws AssertException
right after creating object


-- 
Jun 28 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2184


smjg iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg iname.com
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE




------- Comment #2 from smjg iname.com  2009-01-10 11:30 -------


*** This bug has been marked as a duplicate of 519 ***


-- 
Jan 10 2009