aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-08-26 15:10:23 +0100
committergingerBill <bill@gingerbill.org>2018-08-26 15:10:23 +0100
commite5735af6d6001a2a8b8df08d45ac1778dcc7b6f3 (patch)
tree78363f533306d293e0a384c83ee9dfb9f6373cdc /src/check_stmt.cpp
parenta6b0ae71b2795948976c74ca1e8fbf480b731f89 (diff)
Disable for in over cstring
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp
index 907754cbf..290f2384a 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -1389,7 +1389,7 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
Type *t = base_type(type_deref(operand.type));
switch (t->kind) {
case Type_Basic:
- if (is_type_string(t)) {
+ if (is_type_string(t) && t->Basic.kind != Basic_cstring) {
val0 = t_rune;
val1 = t_int;
add_package_dependency(ctx, "runtime", "__string_decode_rune");