diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-09-06 14:34:38 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-09-06 14:34:38 -0400 |
| commit | cdb326a6e74e80bea9bffbeaaff1c5d1f4c9e733 (patch) | |
| tree | ebb0cda65aae134746acd9dbe6e9b919284b9a4c /src/typecheck.c | |
| parent | aa15f0f78214cefa9fabace61c119e01812a3050 (diff) | |
Code cleanup
Diffstat (limited to 'src/typecheck.c')
| -rw-r--r-- | src/typecheck.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/typecheck.c b/src/typecheck.c index 2d805cdb..e34a85de 100644 --- a/src/typecheck.c +++ b/src/typecheck.c @@ -1356,7 +1356,7 @@ type_t *get_type(env_t *env, ast_t *ast) { } } } else if ((ast->tag == Divide || ast->tag == Mod || ast->tag == Mod1) && is_numeric_type(rhs_t)) { - binding_t *b = get_namespace_binding(env, binop.lhs, binop_method_name(ast->tag)); + binding_t *b = get_namespace_binding(env, binop.lhs, binop_info[ast->tag].method_name); if (b && b->type->tag == FunctionType) { DeclareMatch(fn, b->type, FunctionType); if (type_eq(fn->ret, lhs_t)) { @@ -1415,7 +1415,7 @@ type_t *get_type(env_t *env, ast_t *ast) { code_err(reduction->iter, "I don't know how to do a reduction over ", type_to_str(iter_t), " values"); if (reduction->key && !(reduction->op == Min || reduction->op == Max)) { env_t *item_scope = fresh_scope(env); - const char *op_str = binop_operator(reduction->op); + const char *op_str = binop_info[reduction->op].operator; set_binding(item_scope, op_str, iterated, EMPTY_TEXT); iterated = get_type(item_scope, reduction->key); } |
