Skip to content
ZOLO / TE203 Type · error

runtime generic witness requires a concrete supported data type

Compiler diagnostic TE203: runtime generic witness requires a concrete supported data type.

@reify(T) preserves a generic function's concrete semantic type at runtime. The compiler adds private witnesses while calls and callback conversions retain their ordinary public argument list.

@reify(T)
fn contract<T>(value: T) -> str {
  typeinfo(T).key
}

let key = contract([1, 2])

The immutable descriptor provides key, name, and kind. key is versioned and includes the complete checked nominal identity and data schema, recursively including arrays, maps, tuples, optionals, record fields and enum payloads. It is suitable for checking whether retained data has the same type contract. It is not a serialization format or a persisted ABI guarantee between compiler versions. name renders the schema; kind is "type".

TE203 rejects an invalid decorator, an erased/unresolved type, a generic type without a forwarded witness, or a callable/resource/control capability. Add a concrete data annotation, forward from an @reify generic function, or keep resources outside retained data. A runtime type(value) cannot recover a lost static contract. A typed first-class conversion binds the compiler witness and keeps the callback's public arity.

Bounded reified callbacks currently require a concrete ordinary wrapper. A first-class function type does not retain resolved trait requirements, so an adapter or erasure reports TE203. A direct call to the checked declaration continues to enforce its bounds normally:

fn concrete(value: Token) -> str { bounded_contract(value) }
let callback: fn(Token) -> str = concrete

A recursive generic field such as Cell<int>? is rejected when semantic analysis has erased its arguments into a bare Cell reference. TE203 prevents that field from sharing a key with Cell<str>?. Nongeneric recursive data is supported; use concrete nongeneric models until recursive generic arguments are retained throughout semantic analysis.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en