Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 32 lines (21 sloc) 0.578 kb
288e046 [t] and [t/spec]
moritz authored
1 use v6;
2 use Test;
3
971ba26 fix some smartlinks
szabgab authored
4 # L<S02/Mutable types/A single key-to-value association>
288e046 [t] and [t/spec]
moritz authored
5 # There ought to be a better reference for this.
6 # And this test is also a candidate to be moved with other subroutine tests.
7
8
9 plan 2;
10
11 # this used to be a pugs regression
12 {
13 my sub foo ($x) { $x.perl }
14
15 my $pair = (a => 1);
16 my $Pair = $pair.WHAT;
17
18 lives_ok { foo($Pair) }, "passing ::Pair to a sub works";
19 }
20
21 # But this works:
22 {
23 my sub foo ($x) { $x.perl }
24
25 my $int = 42;
26 my $Int = $int.WHAT;
27
28 lives_ok { foo($Int) }, "passing ::Int to a sub works";
29 }
7f29bc5 [t/spec] Add vim: lines everywhere.
kyle authored
30
31 # vim: ft=perl6
Something went wrong with that request. Please try again.