pike.git / src / las.cmod

version» Context lines:

pike.git/src/las.cmod:3325:       if (!pike_types_le(array_zero, expression->type)) {    yytype_report(REPORT_ERROR,    NULL, 0, array_zero,    NULL, 0, expression->type,    0, "Bad argument 1 to foreach().");    } else {    if ((c->lex.pragmas & ID_STRICT_TYPES) &&    !pike_types_le(expression->type, array_type_string)) {    yytype_report(REPORT_WARNING, -  NULL, 0, expression->type, +     NULL, 0, array_type_string, -  +  NULL, 0, expression->type,    0,    "Argument 1 to foreach() is not always an array.");    }       if (!lvalues) {    /* No loop variable. Will be converted to a counted loop    * by treeopt. */    } else if( lvalues->type->type == PIKE_T_AUTO ) {    fix_auto_node(lvalues, expression->type->car);    } else if (pike_types_le(lvalues->type, void_type_string)) {    yytype_report(REPORT_ERROR, -  NULL, 0, lvalues->type, +     NULL, 0, expression->type->car, -  +  NULL, 0, lvalues->type,    0,    "Bad argument 2 to foreach().");    } else {    struct pike_type *array_value_type;       type_stack_mark();    push_finished_type(lvalues->type);    push_unlimited_array_type(T_ARRAY);    array_value_type = pop_unfinished_type();