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
- Testing › property / for all — generative tests
- Testing › @example — a value for a pattern
- Testing
- Write tests, stub collaborators, and pin a `Val[T]`
See also
- The grammar rule it governs:
for_all. - Every code in its category, Properties (generative tests), on the diagnostic index.
bynk explain bynk.property.where_not_boolshows the same from the installed toolchain, without a network.