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


Maxim Fomin <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]


--- Comment #1 from Maxim Fomin <[email protected]> 2013-01-27 22:22:16 PST 
---
>From http://dlang.org/dbc.html:

"The code in the invariant may not call any public non-static members of the
class or struct, either directly or indirectly. Doing so will result in a stack
overflow, as the invariant will wind up being called in an infinitely recursive
manner. "

I understand that it does not mean that implementation enforces the rules.
Ability to call functions from invariants is a loophole, and there is
possibility to enter infinite loop in cases which are more complicated then
above. Human still can write code which avoids compiler constraints - the
question here is whether to introduce control flow for calling functions from
invariants, or throw exceptions, or just do nothing.

Either this should be marked as enhancement request, or RESOLVED-WONTFIX

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

Reply via email to