Open
Description
Is your feature request related to a problem? Please describe.
Currently we have 2 cases, which the CheckCommand does not handle correctly imo.
We can't have the following commands with the following values:
OnlyValidStructIfAllFieldsAreNonZero {
bar: ""
bar2: "asdf"
}
Foo {
bar: 0
}
OnlyValidStructIfAllFieldsAreNonZero
is allowed by CheckCommand as at least one field is non-zero (bar2
)Foo
is allowed by CheckCommand as (ironically) the number 0 is considered non-zero.
Describe the solution you'd like
If we introduce a IsZeroer interface, types used in Commands can optionally implement IsZero()
and thus have their own semantic meaning of being zero-valued or not.
Describe alternatives you've considered
No alternatives