When a field is marked with @NonNull, field !is null is asserted.
class Class { @NonNull Object obj_; this(Object obj) { this.obj_ = obj; } mixin(GenerateInvariants); } (new Class(null)).shouldThrow!AssertError;
See Implementation
When a field is marked with @NonNull, field !is null is asserted.