----- Original Message ----

> From: "[EMAIL PROTECTED] via RT" <[EMAIL PROTECTED]>
>
> Thanks for testing. :-)
> 
> On Tue Nov 25 23:38:58 2008, [EMAIL PROTECTED] wrote:
> > t/spec/S12-methods/default-trait.t                           (Wstat: 0
> > Tests: 6 Failed: 1)
> >   Failed test:  2
> > 
> I'd be especially interested in the test output of this one (or to know
> if it's no longer failing with latest Rakudo). Since I was just working
> on that recently, and can't reproduce a failure here.

t/spec/S12-methods/default-trait.t .. 
oh yes
oh yes
oh yes
1..6
ok 1 - 'is default' trait makes otherwise ambigous method dispatch live
not ok 2 - 'is default' trait tie-breaks on method dispatch
ok 3 - 'is default' trait makes otherwise ambigous method dispatch live
ok 4 - 'is default' trait on subs
ok 5 - basic sanity with arity based dispatch and slurpies
ok 6 - "is default" trait wins against empty slurpy param
Failed 1/6 subtests 

Test Summary Report
-------------------
t/spec/S12-methods/default-trait.t (Wstat: 0 Tests: 6 Failed: 1)
  Failed test:  2
Files=1, Tests=6,  1 wallclock secs ( 0.02 usr  0.01 sys +  1.17 cusr  0.08 
csys =  1.28 CPU)
Result: FAIL

The failing test:

  class Something {
      multi method doit(Int $x)            { 2 * $x };
      multi method doit(Int $x) is default { 3 * $x };
  }

  my $obj = Something.new();
  lives_ok { $obj.doit(3) }, "'is default' trait makes otherwise ambigous 
method dispatch live";
  is $obj.doit(3), 9, "'is default' trait tie-breaks on method dispatch";  
  
$obj.doit(3) returns 6, not 9.

Cheers,
Ovid
--
Buy the book         - http://www.oreilly.com/catalog/perlhks/
Tech blog            - http://use.perl.org/~Ovid/journal/
Twitter              - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Reply via email to