pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:6452:    Pike_fatal("Strange function type in soft cast.\n");    }   #endif /* PIKE_DEBUG */    if (!(tmp2 = soft_cast(soft_type->car, orig_type->car,    flags ^ SOFT_WEAKER))) {    goto function_cast_fail;    }    push_finished_type(tmp2);    free_type(tmp2);    tmp2 = NULL; +  if ((orig_type->type == T_MANY) && +  (soft_type->type == T_MANY)) {    /* Note: Special case for the return type in case of create(). */    if (tmp) {    orig_type = tmp;    } else {    orig_type = orig_type->cdr;    }    if (tmp3) {    soft_type = tmp3;    } else {    soft_type = soft_type->cdr;    }    if (!(tmp2 = soft_cast(soft_type, orig_type, flags))) {    goto function_cast_fail;    }    push_finished_type(tmp2);    free_type(tmp2);    tmp2 = NULL; -  +  } else { +  /* Some kind of complex function type. */ +  /* FIXME: Handle the case where tmp != NULL */ +  push_finished_type(orig_type); +  push_finished_type(soft_type); +  push_type(T_AND); +  }    while(array_cnt--) push_unlimited_array_type(T_ARRAY);    push_reverse_type(T_MANY);    while(loop_cnt--) push_reverse_type(T_FUNCTION);    res = pop_unfinished_type();    break;    }    function_cast_fail:    type_stack_pop_to_mark();    break;    case T_NOT: /* FIXME. */