From b82cbcb45cb9f0b2e1f4487fea92c86a56d8c392 Mon Sep 17 00:00:00 2001 From: sofia Date: Mon, 14 Jul 2025 19:02:21 +0300 Subject: [PATCH] Fix function call not faulting on undefined function --- reid/src/mir/typecheck.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reid/src/mir/typecheck.rs b/reid/src/mir/typecheck.rs index 044bb6e..a32a557 100644 --- a/reid/src/mir/typecheck.rs +++ b/reid/src/mir/typecheck.rs @@ -326,7 +326,7 @@ impl Expression { .cloned() .ok_or(ErrorKind::FunctionNotDefined(function_call.name.clone())); - if let Ok(f) = true_function { + if let Some(f) = state.ok(true_function, self.1) { let param_len_given = function_call.parameters.len(); let param_len_expected = f.params.len();