pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:2437:    if ((s->type == T_FUNCTION) ||    ((s->type == T_MANY) && (s->car->type != T_VOID))) {    fprintf(stderr, ", ");    }    }    if (s->type != T_MANY) {    fprintf(stderr, ", @");    simple_describe_type(s);    fprintf(stderr, ")");    } else { -  if (s->car->type != T_VOID) { +  if (!s->car || (s->car->type != T_VOID)) {    simple_describe_type(s->car);    fprintf(stderr, "...");    }    fprintf(stderr, ":");    simple_describe_type(s->cdr);    fprintf(stderr, ")");    }    break;    case T_ARRAY: /* FIXME: cdr */    fprintf(stderr, "array(");
pike.git/src/pike_types.cmod:7684:    if(!(flags & NO_MAX_ARGS))    max_correct_args=correct_args;    }       if ((a->type != T_MANY) || (b->type != T_MANY)) {    /* Handle the generic case. */    return low_match_types(a, b, flags);    }       /* check the 'many' type */ -  if(b->car->type != T_VOID && -  a->car->type != T_VOID) +  if(b->car && (b->car->type != T_VOID) && +  a->car && (a->car->type != T_VOID))    {    if(!(tmp = low_match_types(a->car, b->car,    (flags | NO_MAX_ARGS) & ~(A_EXACT|B_EXACT)))) {    return 0;    }    free_type(tmp);    }    if(!(flags & NO_MAX_ARGS))    max_correct_args=MAX_INT32;    /* check the returntype */
pike.git/src/pike_types.cmod:8523:    }       if ((a->type != T_MANY) || (b->type != T_MANY)) {    /* Handle the generic case. */    return low_pike_types_le(a, b, array_cnt, flags);    }       /* FALLTHRU */    case TWOT(T_MANY, T_MANY):    /* check the 'many' type */ -  if ((a->car->type != T_VOID) && (b->car->type != T_VOID)) { +  if (a->car && (a->car->type != T_VOID) && +  b->car && (b->car->type != T_VOID)) {    /* Note: flags never has grouping at this point. */    if (!low_pike_types_le(b->car, a->car, 0, flags ^ LE_A_B_SWAPPED)) {    return 0;    }    } else if ((flags & LE_TYPE_SVALUE) && (a->car->type != b->car->type)) {    if (a->car->type == T_VOID) {    /* Note: flags never has grouping at this point. */    if (!low_pike_types_le(b->car, zero_type_string, 0,    flags ^ LE_A_B_SWAPPED)) {    return 0;