aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 039b89954..7cfd8e113 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -3767,6 +3767,11 @@ irValue *ir_emit_comp(irProcedure *proc, TokenKind op_kind, irValue *left, irVal
}
if (is_type_string(a)) {
+ if (is_type_cstring(a)) {
+ left = ir_emit_conv(proc, left, t_string);
+ right = ir_emit_conv(proc, right, t_string);
+ }
+
char *runtime_proc = nullptr;
switch (op_kind) {
case Token_CmpEq: runtime_proc = "string_eq"; break;