On Wed Sep 17 08:35:08 2008, pmichaud wrote: > Actually, I suspect the problem may be that 'max' is already a > builtin function in Perl, and that the conflict comes because > the builtins (written in PIR) are still using Parrot's MultiSub > while the ones written in Perl 6 are using the new Perl6MultiSub > implementation. If I change the function name in max3.p6 to > be something other than 'max', it appears to work: > > $ cat max3.p6 > multi sub max3($a, $b) { > if defined $a && defined $b { > if $a >= $b { return $a } else { return $b } > } > elsif defined $a { return $a } > elsif defined $b { return $b } > else { return undef } > } > > multi sub max3($a, $b, $c) { > return max3(max3($a, $b), $c); > } > > say "6 <" ~ max3(9,2,1) ~ ">"; > $ ./parrot perl6.pbc max3.p6 > 6 <9> > $ > > So, this problem should be "fixed" when we get the builtins to be > written in Perl 6 (or at least using Perl6MultiSubs). > max is now moved to the setting, and the problem is indeed cleared up. Resolving ticket.
Thanks, Jonathan