You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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
The text was updated successfully, but these errors were encountered: