Skip to main content

Module typechecker

Module typechecker 

Source

Structs§

InlayHintInfo
An inlay hint produced during type checking.
TypeChecker
The static type checker.
TypeDiagnostic
A diagnostic produced by the type checker.

Enums§

DiagnosticDetails
Optional structured companion data on a TypeDiagnostic. The variants map one-to-one with diagnostics that have specific tooling-consumable state beyond the human-readable message; each variant is attached only by the sites that produce its corresponding diagnostic, so a consumer can pattern-match on the variant without parsing the error string.
DiagnosticSeverity

Functions§

block_definitely_exits
Check whether a block definitely exits (contains a terminating statement).
format_type
Pretty-print a type expression for display in error messages.
shape_mismatch_detail
Produce a detail string describing why a Shape type is incompatible with another Shape type — e.g. “missing field ‘age’ (int)” or “field ‘name’ has type int, expected string”. Returns None if both types are not shapes.
stmt_definitely_exits
Check whether a single statement definitely exits (return/throw/break/continue or an if/else where both branches exit).