Logic · rule
type.logical_operand
Logical operator needs Bool operands.
Area 3, Logic; not declinable; the next step is usually the agent's.
type Score = Int {}type Flag = Bool {}function both(score: Score) -> Flag { return Flag(score and score)}
error: `and` needs `Bool` values, and `score` is a `Score` --> main.jadpo:6:17 |6 | return Flag(score and score) | ^^^^^ this is `Score` reason: `and` and `or` work on `Bool` values and types built on `Bool`; Jadpo has no truthiness. next: Compare `score` to get a `Bool` (agent) rule: type.logical_operand help: https://jadpo.dev/docs/errors/type.logical_operandcheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/type.logical_operand.md.Built from Jadpo main at a707efb.