Logic · rule
type.unary_operand
Operator cannot be used with this value.
Area 3, Logic; not declinable; the next step is usually the agent's.
type Phrase = Text {}type Flag = Bool {}function negate(phrase: Phrase) -> Flag { return Flag(not phrase)}
error: `not` needs a `Bool`, and `phrase` is a `Phrase` --> main.jadpo:6:21 |6 | return Flag(not phrase) | ^^^^^^ this is `Phrase` reason: `not` works on `Bool` values and types built on `Bool`; Jadpo has no truthiness. next: Compare `phrase` to get a `Bool` (agent) rule: type.unary_operand help: https://jadpo.dev/docs/errors/type.unary_operandcheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/type.unary_operand.md.Built from Jadpo main at a707efb.