aboutsummaryrefslogtreecommitdiff
path: root/typecheck.c
diff options
context:
space:
mode:
Diffstat (limited to 'typecheck.c')
-rw-r--r--typecheck.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/typecheck.c b/typecheck.c
index 37fe6257..fb78d476 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -1441,8 +1441,8 @@ Table_t *get_arg_bindings(env_t *env, arg_t *spec_args, arg_ast_t *call_args, bo
if (!streq(call_arg->name, spec_arg->name)) continue;
type_t *spec_type = get_arg_type(env, spec_arg);
if (!(type_eq(call_type, spec_type) || (promotion_allowed && can_promote(call_type, spec_type))
- || (!promotion_allowed && call_arg->value->tag == Int && is_numeric_type(spec_type))
- || (!promotion_allowed && call_arg->value->tag == Num && spec_type->tag == NumType)))
+ || (promotion_allowed && call_arg->value->tag == Int && is_numeric_type(spec_type))
+ || (promotion_allowed && call_arg->value->tag == Num && spec_type->tag == NumType)))
return NULL;
Table$str_set(&used_args, call_arg->name, call_arg);
goto next_call_arg;
@@ -1461,8 +1461,8 @@ Table_t *get_arg_bindings(env_t *env, arg_t *spec_args, arg_ast_t *call_args, bo
if (unused_args->name) continue; // Already handled the keyword args
type_t *call_type = get_arg_ast_type(env, unused_args);
if (!(type_eq(call_type, spec_type) || (promotion_allowed && can_promote(call_type, spec_type))
- || (!promotion_allowed && unused_args->value->tag == Int && is_numeric_type(spec_type))
- || (!promotion_allowed && unused_args->value->tag == Num && spec_type->tag == NumType)))
+ || (promotion_allowed && unused_args->value->tag == Int && is_numeric_type(spec_type))
+ || (promotion_allowed && unused_args->value->tag == Num && spec_type->tag == NumType)))
return NULL; // Positional arg trying to fill in
Table$str_set(&used_args, spec_arg->name, unused_args);
unused_args = unused_args->next;