pike.git / src / las.cmod

version» Context lines:

pike.git/src/las.cmod:3302:    if (CAR(lvalues)) {    /* Check the index type */    struct pike_type *index_fun_type;    struct pike_type *index_type;    MAKE_CONSTANT_TYPE(index_fun_type,    tOr4(tFunc(tOr(tArray, tStr), tZero),    tFunc(tMap(tSetvar(0, tMix),    tMix), tVar(0)),    tFunc(tSet(tSetvar(1, tMix)),    tVar(1)), -  tFunc(tObj, tZero))); +  tFuncArg(tSetvar(2, tObj), +  tFindLFun(tVar(2), +  "_iterator_index"))));    index_type = check_call(foreach_call_type, index_fun_type, 0);    if (!index_type) {    /* Should not happen. */    yytype_report(REPORT_ERROR,    NULL, 0, NULL,    NULL, 0, NULL,    0, "Bad iterator type for index in foreach().");    } else {    if( CAR(lvalues)->type->type == PIKE_T_AUTO )    {
pike.git/src/las.cmod:3338:    }    free_type(index_fun_type);    }    if (CDR(lvalues)) {    /* Check the value type */    struct pike_type *value_fun_type;    struct pike_type *value_type;    MAKE_CONSTANT_TYPE(value_fun_type,    tOr5(tFunc(tArr(tSetvar(0, tMix)),    tVar(0)), -  tFunc(tStr, tZero), -  tFunc(tMap(tMix,tSetvar(1, tMix)), +  tFunc(tNStr(tSetvar(1, tMix)),    tVar(1)), -  +  tFunc(tMap(tMix,tSetvar(2, tMix)), +  tVar(2)),    tFunc(tMultiset, tInt1), -  tFunc(tObj, tZero))); +  tFuncArg(tSetvar(3, tObj), +  tFindLFun(tVar(3), +  "_iterator_value"))));    value_type = check_call(foreach_call_type, value_fun_type, 0);    if (!value_type) {    /* Should not happen. */    yytype_report(REPORT_ERROR,    NULL, 0, NULL,    NULL, 0, NULL,    0, "Bad iterator type for value in foreach().");    } else {    if( CDR(lvalues)->type->type == PIKE_T_AUTO )    {