Skip to content
ZOLO / TE194 Type · error

schema invariant requires a checked declaration-owned bool and decoder contract

Compiler diagnostic TE194: schema invariant requires a checked declaration-owned bool and decoder contract.

Why this fires

A schema-wide where clause must be a unary predicate accepting the assembled schema and returning exactly bool. Field validation/defaults finish first.

schema Booking { start: int, end: int }
where |booking| booking.start < booking.end

Supply labels or checked conversions in an explicit lambda when needed. An erased return is not accepted as boolean truthiness. A field whose current decoder only checks a table/number shape cannot acquire a guessed nominal, callable or representation type through this feature. Use a schema whose fields have a complete checked scalar or structural decoder.

The diagnostic carries no automatic edit: the compiler cannot invent a domain predicate, conversion or label contract. The primary span is the authored where keyword or the unsupported field declaration.

Schema codecs with whole-value invariants are currently runtime operations. Direct comptime codec calls and JavaScript program lowering refuse this surface explicitly. VM and AOT raw AST APIs require the checked canonical front end.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en