From e5735af6d6001a2a8b8df08d45ac1778dcc7b6f3 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 26 Aug 2018 15:10:23 +0100 Subject: Disable for in over cstring --- src/check_stmt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/check_stmt.cpp') 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"); -- cgit v1.2.3