From 7ce2d9a347c01d8589445674f8d94688a59dd770 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 30 Jun 2020 23:12:59 +0200 Subject: [PATCH] :bug: Fix user operators --- src/parse/func_operator.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/parse/func_operator.c b/src/parse/func_operator.c index 82afc43d..e4ecd89c 100644 --- a/src/parse/func_operator.c +++ b/src/parse/func_operator.c @@ -15,7 +15,9 @@ ANN void func_operator(const Func_Def fdef, struct Op_Import *opi) { const Arg_List args = fdef->base->args; opi->lhs = is_unary ? NULL : args ? args->var_decl->value->type : NULL; - opi->rhs = args ? is_unary ? args->var_decl->value->type : - args->next ? args->next->var_decl->value->type : - fdef->base->ret_type : NULL; + if(strcmp(str, "@implicit")) + opi->rhs = args ? is_unary ? args->var_decl->value->type : + (args->next ? args->next->var_decl->value->type : NULL) : NULL; + else + opi->rhs = fdef->base->ret_type; } -- 2.43.0