Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix incorrect semantics in interaction of .? and multis.
  • Loading branch information
jnthn committed Aug 14, 2009
1 parent d50cabc commit 62f6082
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/classes/Object.pir
Expand Up @@ -692,9 +692,18 @@ method, and returns undef if there are none.

# If we were already given a list, just check it's non-empty and use that.
if null methods goto no_list
retry:
$I0 = elements methods
unless $I0 goto error
$P0 = methods[0]
$I0 = isa $P0, 'Perl6MultiSub'
unless $I0 goto ready_to_call
$P0 = $P0.'find_possible_candidates'(self, pos_args :flat, named_args :named :flat)
$P0 = $P0[0]
unless null $P0 goto ready_to_call
$P0 = shift methods
goto retry
ready_to_call:
.tailcall self.$P0(pos_args :flat, named_args :named :flat)

# If there's no list, use .can to try and get us one.
Expand Down

0 comments on commit 62f6082

Please sign in to comment.