From 22f4a8761b4b47bfac68ab20d60788823ad6f1a5 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sun, 2 Jan 2022 23:04:07 -0600 Subject: [PATCH] tiny potential bug fix --- src/polymorph.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/polymorph.h b/src/polymorph.h index 0dfcfee1..94d8c09d 100644 --- a/src/polymorph.h +++ b/src/polymorph.h @@ -420,13 +420,13 @@ static AstTyped* try_lookup_based_on_partial_function_type(AstPolyProc *pp, AstF AstType *old_return_type = ft->return_type; ft->return_type = (AstType *) &basic_type_void; ft->partial_function_type = type_build_from_ast(context.ast_alloc, (AstType *) ft); + ft->return_type = old_return_type; if (!ft->partial_function_type) { doing_nested_polymorph_lookup = 1; return NULL; } assert(ft->partial_function_type); - ft->return_type = old_return_type; } AstTyped *result = (AstTyped *) polymorphic_proc_lookup(pp, PPLM_By_Function_Type, ft->partial_function_type, pp->token); -- 2.25.1