Disable for in over cstring

This commit is contained in:
gingerBill
2018-08-26 15:10:23 +01:00
parent a6b0ae71b2
commit e5735af6d6
3 changed files with 34 additions and 6 deletions
+1 -1
View File
@@ -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");