aboutsummaryrefslogtreecommitdiff
path: root/src/check_builtin.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-08-02 12:20:35 +0100
committergingerBill <gingerBill@users.noreply.github.com>2025-08-02 12:20:35 +0100
commitbb4bc316a4bd86774953f1e8fcefffb5ed8bbf37 (patch)
treebd48bf739dd69c0bc6578fb2a69cc5823ddee6f8 /src/check_builtin.cpp
parentae02d3d02d2eb5132fa7c6573ed7db20d7e18f3e (diff)
`for in string16`; Support `string16` across core
Diffstat (limited to 'src/check_builtin.cpp')
-rw-r--r--src/check_builtin.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index 4abace637..66ea0cfbd 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -7179,7 +7179,11 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
return false;
}
operand->mode = Addressing_Value;
- operand->type = alloc_type_multi_pointer(t_u16);
+ if (type_hint != nullptr && is_type_cstring16(type_hint)) {
+ operand->type = type_hint;
+ } else {
+ operand->type = alloc_type_multi_pointer(t_u16);
+ }
operand->value = {};
break;
}