Skip to content
Playground(another site)

bynk.property.where_not_bool

Error A for all ... where filter does not type to Bool.

A where clause on for all discards each generated input that fails it, so it must be a Bool. A filter of another type, such as an Int, cannot say whether to keep an input. Write a comparison over the bound variables.

Example

for all n: Int where n + 1 { // ✗ an `Int`, not a `Bool`
for all n: Int where n > 0 { // ✓

In the Book

See also