[Issue 7182] Call const or immutable member functions from class invariant

2017-06-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7182

Vladimir Panteleev  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||dlang-bugzilla@thecybershad
   ||ow.net
 Resolution|--- |INVALID

--- Comment #2 from Vladimir Panteleev  ---
(In reply to Infiltrator from comment #1)
> I think that the issue would instead be with the fact that public functions
> (f() in this case) call invariant() before and after they run, which would
> result in an infinite loop.

Pretty sure your explanation is correct.

Although one may argument in favor of making const methods not cause invariant
checks, that would mean that e.g. getters are no longer protected by
invariants, should something modify the object's state into an invalid one
directly (e.g. by writing to fields).

--


[Issue 7182] Call const or immutable member functions from class invariant

2014-03-19 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7182


Infiltrator  changed:

   What|Removed |Added

 CC||lt.infiltra...@gmail.com


--- Comment #1 from Infiltrator  2014-03-19 22:38:31 
PDT ---
I think that the issue would instead be with the fact that public functions
(f() in this case) call invariant() before and after they run, which would
result in an infinite loop.

I therefore think that this should be closed as INVALID.  Any of you big guns
want to weigh in on this?

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


[Issue 7182] Call const or immutable member functions from class invariant

2011-12-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7182


Taco  changed:

   What|Removed |Added

   Severity|normal  |enhancement


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