aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-08-05 18:58:35 +0100
committergingerBill <bill@gingerbill.org>2018-08-05 18:58:35 +0100
commit45d3c6c0d351a71e33ae0e02833747fc20c1a51c (patch)
tree3e3733f0ca9009f0d7c4d46c5d137ceed3d87e40 /src/ir.cpp
parentc6bffd7c356fc777b3ac79072cfd49c4fe83bc4e (diff)
Fix `cstring` to `string` conversion
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 8d555c7b3..311b0496d 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -3282,7 +3282,7 @@ irValue *ir_emit_conv(irProcedure *proc, irValue *value, Type *t) {
return ir_emit_bitcast(proc, value, dst);
}
- if (src == t_cstring && dst == t_string) {
+ if (are_types_identical(src, t_cstring) && are_types_identical(dst, t_string)) {
irValue *c = ir_emit_conv(proc, value, t_cstring);
auto args = array_make<irValue *>(ir_allocator(), 1);
args[0] = c;