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


Maxim Fomin <ma...@maxim-fomin.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ma...@maxim-fomin.ru


--- Comment #1 from Maxim Fomin <ma...@maxim-fomin.ru> 2012-11-14 04:40:52 PST 
---
(In reply to comment #0)
> C has an implicitly generated constructor

Why? It seems there is no constructor in case like this. 

> but the invariant isn't compiled or
> it doesn't run. If you add an explicit empty constructor then it does get
> added.

It is compiled but is not run because there is no ctor. The spec says that
invariant is called when ctor completes but it does not say what happens when
there is no ctor. You actually asking either create dummy ctor for cases like
this or call invariant just after allocating class object which is not
efficient - the first call to public function will abort the application
anyway.

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

Reply via email to