ErrorsValues and types · rule
type.nullable_selection
Field is read from a value that may be none.
Area 2, Values and types; not declinable; the next step is usually the agent's.
type ProductName = Text { max_length: 120}type Product = Object { name: ProductName}function listed_name(product: Product?) -> ProductName { return product.name}
error product may be none, so name can't be read yet
--> main.jadpo:10:20
|10 | return product.name | ^^^^ may be `none`
- reason
productisProduct?; a field is read oncematchhas found a value.- next
- Match on
productand readnameinsidesome(...)(agent) - rule
- type.
nullable_ selection - help
- https://jadpo.
dev/docs/errors/type. nullable_ selection
Markdown for agents: /docs/errors/type.nullable_selection.md.Built from Jadpo main at aee2e8f.