The compiler's ergonomics increase if not all types have to be explicitly given everywhere. This generally requires multiple inferring passes. Currently, the type checker fails hard if a type cannot be inferred during its first invocation, prohibiting deferring inferring to a later point.
Change the type checker's fn derive_annotate_expr_type to return a Result<_, _> instead of panic!ing.
The compiler's ergonomics increase if not all types have to be explicitly given everywhere. This generally requires multiple inferring passes. Currently, the type checker fails hard if a type cannot be inferred during its first invocation, prohibiting deferring inferring to a later point.
Change the type checker's
fn derive_annotate_expr_type
to return aResult<_, _>
instead ofpanic!
ing.