From 02522dd36d34ab363d6d19824a40b60b776a4306 Mon Sep 17 00:00:00 2001 From: sofia Date: Mon, 4 Aug 2025 21:18:14 +0300 Subject: [PATCH] Fix typechecker crashing unexpectedly with vague type --- reid/src/mir/typecheck/typecheck.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reid/src/mir/typecheck/typecheck.rs b/reid/src/mir/typecheck/typecheck.rs index 036dba0..fb6db94 100644 --- a/reid/src/mir/typecheck/typecheck.rs +++ b/reid/src/mir/typecheck/typecheck.rs @@ -721,7 +721,7 @@ impl Expression { expr.resolve_ref(typerefs).cast_into(type_kind) } ExprKind::AssociatedFunctionCall(type_kind, function_call) => { - *type_kind = type_kind.or_default().unwrap(); + *type_kind = type_kind.or_default()?; let true_function = state .scope .get_associated_function(&pass::AssociatedFunctionKey(