type.incomparable
Values cannot be compared for equality.
Area 3, Logic; not declinable; the next step is usually the agent's.
type Stock = Int { min: 0}type Quantity = Int { min: 1}type Flag = Bool {}function same(per_pack: Stock, packs: Quantity) -> Flag { return Flag(per_pack == packs)}
error Stock and Quantity can't be compared
--> main.jadpo:12:17
|12 | return Flag(per_pack == packs) | ^^^^^^^^^^^^^^^^^ different types
- reason
==compares two values of the same type, after widening;StockandQuantityare different types, and neither widens to the other.- next
- Compare two values of the same type (agent)
- rule
- type.
incomparable - help
- https://jadpo.
dev/docs/errors/type. incomparable
Markdown for agents: /docs/errors/type.incomparable.md.Built from Jadpo main at aee2e8f.