aboutsummaryrefslogtreecommitdiff
path: root/src/compile/comparisons.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-21 15:14:37 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-21 15:14:37 -0400
commitf5612e38183dc20d18f207f8ab055574a4d93ad0 (patch)
treec2caf5a0311b6d9fd0fbd4c08493dac5981088be /src/compile/comparisons.c
parent7f6683269ce689a83b9c6e1fae15e0cc60351095 (diff)
Bugfixes for anonymous enums, code cleanup to remove type_to_string(),
and changed it so anonymous enums show up in doctests with their full type instead of `enum$20`
Diffstat (limited to 'src/compile/comparisons.c')
-rw-r--r--src/compile/comparisons.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compile/comparisons.c b/src/compile/comparisons.c
index d7531261..0f9a7ddd 100644
--- a/src/compile/comparisons.c
+++ b/src/compile/comparisons.c
@@ -38,7 +38,7 @@ Text_t compile_comparison(env_t *env, ast_t *ast) {
} else if (can_compile_to_type(env, binop.lhs, rhs_t)) {
operand_t = rhs_t;
} else {
- code_err(ast, "I can't do comparisons between ", type_to_str(lhs_t), " and ", type_to_str(rhs_t));
+ code_err(ast, "I can't do comparisons between ", type_to_text(lhs_t), " and ", type_to_text(rhs_t));
}
Text_t lhs, rhs;
@@ -78,7 +78,7 @@ Text_t compile_comparison(env_t *env, ast_t *ast) {
} else if (can_compile_to_type(env, cmp.lhs, rhs_t)) {
operand_t = rhs_t;
} else {
- code_err(ast, "I can't do comparisons between ", type_to_str(lhs_t), " and ", type_to_str(rhs_t));
+ code_err(ast, "I can't do comparisons between ", type_to_text(lhs_t), " and ", type_to_text(rhs_t));
}
Text_t lhs = compile_to_type(env, cmp.lhs, operand_t);