aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-08-02 13:23:20 +0100
committergingerBill <gingerBill@users.noreply.github.com>2025-08-02 13:23:20 +0100
commitf8d24923fdd701c0a08b8ffb7200cebdc9820b76 (patch)
tree37394f5a54a2709f5ff9bd411b519887435533f0 /src
parent86bd9186f9913f4b98f73d9f344d5277acf67fc0 (diff)
Fix `cstring != ""`
Diffstat (limited to 'src')
-rw-r--r--src/llvm_backend_expr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llvm_backend_expr.cpp b/src/llvm_backend_expr.cpp
index f9007d960..5425572c7 100644
--- a/src/llvm_backend_expr.cpp
+++ b/src/llvm_backend_expr.cpp
@@ -1560,7 +1560,7 @@ gb_internal lbValue lb_build_binary_expr(lbProcedure *p, Ast *expr) {
} else if (lb_is_empty_string_constant(be->right) && !is_type_union(be->left->tav.type)) {
// `x == ""` or `x != ""`
Type *str_type = t_string;
- if (is_type_string16(be->left->tav.type)) {
+ if (is_type_string16(be->left->tav.type) || is_type_cstring16(be->left->tav.type)) {
str_type = t_string16;
}
lbValue s = lb_build_expr(p, be->left);
@@ -1572,7 +1572,7 @@ gb_internal lbValue lb_build_binary_expr(lbProcedure *p, Ast *expr) {
} else if (lb_is_empty_string_constant(be->left) && !is_type_union(be->right->tav.type)) {
// `"" == x` or `"" != x`
Type *str_type = t_string;
- if (is_type_string16(be->right->tav.type)) {
+ if (is_type_string16(be->right->tav.type) || is_type_cstring16(be->right->tav.type)) {
str_type = t_string16;
}
lbValue s = lb_build_expr(p, be->right);