https://issues.dlang.org/show_bug.cgi?id=1164
--- Comment #12 from safety0ff.bugz <safety0ff.b...@gmail.com> --- (In reply to Pieter Penninckx from comment #7) > > invariant() { > if(sibling !is null) { > if (sibling.fun()) > { assert(true); } > } > } > Also: https://dlang.org/spec/contracts.html#Invariants "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." --