Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 20 lines (15 sloc) 0.347 kB
c09da2d [spec] moved var/is_copy.t to spec/
moritz authored
1 use v6;
2 use Test;
3
4 # L<S06/"Parameter traits"/"=item is copy">
5 # should be moved with other subroutine tests?
6
7 plan 3;
8
9 {
10 sub foo($a is copy) {
11 $a = 42;
12 return 19;
13 }
14
15 my $bar = 23;
16 is $bar, 23, "basic sanity";
17 is foo($bar), 19, "calling a sub with an is copy param";
18 is $bar, 23, "sub did not change our variable";
19 }
Something went wrong with that request. Please try again.