Skip to content
ZOLO / TE193 Type · error

capture-pattern value requires a checked exact parse contract

Compiler diagnostic TE193: capture-pattern value requires a checked exact parse contract.

Why this fires

pat"users/{id:int}" creates a value with a parse function. Its successful Result payload is an exact anonymous record containing the declared slots. The error payload is { kind: str, input: str, pattern: str }; kind is "mismatch_or_conversion" for the shared matcher's single failure signal.

Use concrete supported scalar capture types, or a visible actual immutable validated-newtype constructor. An unproved generic type, erased any, ordinary instance, type-only alias, private constructor or factory-only interface cannot prove a conversion. A shadowed Result cannot replace the canonical wrapper.

Malformed slot syntax, duplicate slots, unsupported conversions and linear capture targets keep the existing string-pattern diagnostic TE166. Slots do not create bindings in the scope that constructs a pattern value.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en