--- Comment #4 from 2010-11-09 04:13:41 PST ---
(In reply to comment #3)
> 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.

A possible solution using the idea in bug 5125 (syntax is temporary):

pure nothrow bool isDebug() {
    debug return true;
    return false;

@optional_tag(ifDebug(), pure) invariant() { ...

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to