petdance/scratch — Issue #406: cmp_pmc not working in extend_vtable
Author: petdance
Created: 2011-11-01 05:42:16+00:00
State: open
Labels: bug, core, Pri-normal, Sev-medium

The error
{{{
# Failed test 'Parrot_PMC_cmp_pmc'
# at t/src/extend_vtable.t line 155.
# got: 'Failed!
# Exception is: type 44 severity 2 message 'Multiple Dispatch: No suitable candidate found for 'cmp_pmc', with signature 'PP->P''
# '
# expected: '1
# -1
# 0
# Done!
# '
}}}
is produced, even though the signature of cmp_pmc is PP->P as far as I can tell:
{{{
src/pmc/default.pmc:1850: VTABLE PMC *cmp_pmc(PMC *value) {
src/pmc/default.pmc-1851- PMC *retval;
src/pmc/default.pmc-1852-
src/pmc/default.pmc-1853- /* Don't multidispatch if you've got two pointers to the same PMC. They
src/pmc/default.pmc-1854- * are equal. */
src/pmc/default.pmc-1855- if (SELF == value)
src/pmc/default.pmc-1856- return NULL;
src/pmc/default.pmc-1857-
src/pmc/default.pmc-1858- Parrot_mmd_multi_dispatch_from_c_args(INTERP,
src/pmc/default.pmc:1859: "cmp_pmc", "PP->P", SELF, value, &retval);
src/pmc/default.pmc-1860-
src/pmc/default.pmc-1861- return retval;
}}}

Originally http://trac.parrot.org/parrot/ticket/2103