TritonVM / tasm-lang

Writing tasm with Rust syntax
15 stars 2 forks source link

facilitate multiple type inference passes #52

Open jan-ferdinand opened 10 months ago

jan-ferdinand commented 10 months ago

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.