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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 9 04:34:54 PST 2010


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



--- Comment #5 from Don <clugdbug at yahoo.com.au> 2010-11-09 04:33:50 PST ---
(In reply to comment #3)
> 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.

I don't think that problem is unique to invariants.  It's the same issue as
logging in pure functions, and in CTFE functions.

You should be able to do printf-style debugging in ANY pure function.

-- 
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