pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:1378:    */    if ((i < 0) || !is_variant_dispatcher(p, i)) {    Pike_error("Failed to find dispatcher for inherited "    "variant function: %S\n", id->name);    }    if (PTR_FROM_INT(p, i)->inherit_offset) {    Pike_error("Dispatcher for variant function %S "    "is inherited.\n", id->name);    }    gs_flags = ref->id_flags & PTR_FROM_INT(p, i)->id_flags; -  if (id_dumped[PTR_FROM_INT(p, i)->identifier_offset]) { +  if (id_dumped[PTR_FROM_INT(p, i)->identifier_offset] || +  (i < d)) { +  /* Either already dumped, or the dispatcher is in +  * front of us, which indicates that we are overloading +  * an inherited function with a variant. +  */    gs_flags |= ID_VARIANT;    } else {    /* First variant. */    id_dumped[PTR_FROM_INT(p, i)->identifier_offset] = 1;    }    }       if (IDENTIFIER_IS_ALIAS(id->identifier_flags)) {    if ((!id->func.ext_ref.depth) &&    IDENTIFIER_IS_VARIABLE(id->identifier_flags)) {