Module inference

Source

Structs§

TypeInference
Handles type inference and finalization

Functions§

determine_let_statement_type
Determines the final type of a variable in a let statement based on both the declared type (if any) and the initialization expression’s type. Handles type inference and coercion of unspecified literals.
finalize_inferred_type
Converts unspecified literal types to concrete types. This is used to assign a default concrete type when an unspecified literal is used in a context where the type wasn’t explicitly given.
handle_unspecified_float_assignment
Handles assignment of an unspecified float literal to a variable with a declared type.
handle_unspecified_int_assignment
Handles assignment of an unspecified integer literal to a variable with a declared type.
is_float_type
Checks if a type is a float type
is_integer_type
Checks if a type is an integer type
is_unsigned_type
Checks if a type is an unsigned integer type