[Issue 4974] Cannot have pure constructor due to impure invariant

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 8 22:37:51 PST 2010


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



--- Comment #3 from Jonathan M Davis <jmdavisProg at gmx.com> 2010-11-08 22:36:47 PST ---
Well, marking an invariant as pure does seem to actually make it pure which is
a definite improvement, though honestly, I rather like the idea of the compiler
acting like all invariants are pure so that you can have pure functions and
still be able to use stuff like writeln() in your invariant when debugging. As
it is, marking an invariant as pure does seem to make it possible to have pure
functions, but it eliminates your ability to print debug statements in
invariants.

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


More information about the Digitalmars-d-bugs mailing list