Fix typechecker crashing unexpectedly with vague type

This commit is contained in:
Sofia 2025-08-04 21:18:14 +03:00
parent 5b7c3d5b3a
commit 02522dd36d

View File

@ -721,7 +721,7 @@ impl Expression {
expr.resolve_ref(typerefs).cast_into(type_kind) expr.resolve_ref(typerefs).cast_into(type_kind)
} }
ExprKind::AssociatedFunctionCall(type_kind, function_call) => { ExprKind::AssociatedFunctionCall(type_kind, function_call) => {
*type_kind = type_kind.or_default().unwrap(); *type_kind = type_kind.or_default()?;
let true_function = state let true_function = state
.scope .scope
.get_associated_function(&pass::AssociatedFunctionKey( .get_associated_function(&pass::AssociatedFunctionKey(