https://issues.dlang.org/show_bug.cgi?id=18757
--- Comment #4 from RazvanN <razvan.nitu1...@gmail.com> --- (In reply to uplink.coder from comment #3) > Well invariants cannot apply to static methods since they are only concerned > about the object's state. > which by definition cannot be directly touched in static functions. > that's why it's not called. > > I don't see that there is a basis to issue a warning. What about object that have static fields? If you have a static function which modify static fields? I would argue that an invariant might want to check whether a static function has modified the state of the object. --