Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #114394, type captures and containers
  • Loading branch information
moritz committed Aug 7, 2012
1 parent 69acfcf commit 7c3f87a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion S06-multi/type-based.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 52;
plan 53;

# type based dispatching
#
Expand Down Expand Up @@ -93,6 +93,10 @@ is(mmd(1..3), 2, 'Slurpy MMD to listop via list');
is wins(Paper.new, Paper.new), 0, 'multi dispatch with ::T generics';
is wins(Paper.new, Scissor.new), -1, 'fallback if there is a ::T variant';

# RT #114394
sub p($a, $b) { wins($a, $b) };
is p(Paper, Paper), 0, 'Type captures and containers mix (RT 114394)';

multi wins2(Scissor $x, Paper $y) { 1 } #OK not used
multi wins2($x, $y where { $x.WHAT.gist eq $y.WHAT.gist }) { 0 }
multi wins2($x, $y) { -1 } #OK not used
Expand Down
3 changes: 2 additions & 1 deletion S32-io/io-path.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 5;
plan 6;

my $path = '/foo/bar.txt'.path;
isa_ok $path, IO::Path;
Expand All @@ -10,3 +10,4 @@ is $path.basename, 'bar.txt', 'basename';

is '/'.path.path, '/', '.path.path roundtrips';
is '///.'.path.path, '///.', '... even for weird cases';
is 'foo.bar'.path.path, 'foo.bar', 'roundtrips for base names only';

0 comments on commit 7c3f87a

Please sign in to comment.