On Tue Sep 23 14:32:13 2008, pmichaud wrote: > The .sort method on FixedPMCArray fails with "no applicable methods" > when given a MultiSub PMC as a comparison function. Here's a sample > PIR program: > > $ cat x.pir > .sub 'main' > .local pmc arr > arr = new 'FixedPMCArray' > arr = 4 > arr[0] = 'just' > arr[1] = 'another' > arr[2] = 'perl' > arr[3] = 'hacker' > > ## called with normal Sub, works > $P0 = get_global 'cmpfn1' > arr.'sort'($P0) > $S0 = join ' ', arr > say $S0 > > ## called with MultiSub, fails > $P0 = get_global 'cmpfn2' > arr.'sort'($P0) > $S0 = join ' ', arr > say $S0 > .end > > .sub 'cmpfn1' > .param pmc a > .param pmc b > $I0 = cmp_str a, b > .return ($I0) > .end > > .sub 'cmpfn2' :multi(_, _) > .param pmc a > .param pmc b > $I0 = cmp_str a, b > .return ($I0) > .end > $ ./parrot x.pir > another hacker just perl > No applicable methods. > > current instr.: 'main' pc -34072556 ((unknown file):-1) > called from Sub 'main' pc 49 (x.pir:18) > $ > > See also some of the analysis I did on the parrot-dev > mailing list (subject: "References to multis (at PIR level)")-- > I can repost that to the ticket if it would be helpful. > > Pm
Now being tracked at https://trac.parrot.org/parrot/ticket/1039. -- Will "Coke" Coleda _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
