Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (21 sloc) 578 Bytes
use v6;
use Test;
# L<S02/Mutable types/A single key-to-value association>
# There ought to be a better reference for this.
# And this test is also a candidate to be moved with other subroutine tests.
plan 2;
# this used to be a pugs regression
{
my sub foo ($x) { $x.perl }
my $pair = (a => 1);
my $Pair = $pair.WHAT;
lives_ok { foo($Pair) }, "passing ::Pair to a sub works";
}
# But this works:
{
my sub foo ($x) { $x.perl }
my $int = 42;
my $Int = $int.WHAT;
lives_ok { foo($Int) }, "passing ::Int to a sub works";
}
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.