Bug 2184 – Class Invariants not called

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2008-06-28T19:01:00Z
Last change time
2014-02-24T15:32:52Z
Keywords
wrong-code
Assigned to
bugzilla
Creator
gim913

Attachments

IDFilenameSummaryContent-TypeSize
261t05_invariant.dTestcasetext/plain383

Comments

Comment #0 by gim913 — 2008-06-28T19:01:01Z
If there is no ctor defined (e.g. default one is called) class invariant is not called.
Comment #1 by gim913 — 2008-06-28T19:03:59Z
Created attachment 261 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
Comment #2 by smjg — 2009-01-10T11:30:46Z
*** This bug has been marked as a duplicate of 519 ***