Skip to content
Playground(another site)

bynk.transition.not_bool

Error A transition predicate does not have type Bool.

A transition is a claim about a step, from old to new, that is either kept or broken, so its predicate must be a Bool. A bare new.count is a value, not a claim. Compare it with the old state: new.count >= old.count. An invariant is held to the same rule (bynk.invariant.not_bool).

Example

transition grows: new.count // ✗ an `Int`, not a `Bool`
transition grows: new.count >= old.count // ✓ a claim about the step

In the Book

See also