From e5ef4e8dba91a405d91c5e22589058c654b1e759 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sun, 26 Nov 2023 14:11:07 -0800 Subject: [PATCH] evaluator: fix prim_func_type using args term as returns term --- evaluator.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evaluator.lua b/evaluator.lua index 98c7cf40..130b804a 100644 --- a/evaluator.lua +++ b/evaluator.lua @@ -1055,7 +1055,7 @@ function infer( elseif inferrable_term:is_prim_function_type() then local args, returns = inferrable_term:unwrap_prim_function_type() local arg_type, arg_usages, arg_term = infer(args, typechecking_context) - local return_type, return_usages, return_term = infer(args, typechecking_context) + local return_type, return_usages, return_term = infer(returns, typechecking_context) local res_usages = usage_array() add_arrays(res_usages, arg_usages) add_arrays(res_usages, return_usages)