Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (17 sloc) 0.511 kB
use v6;
use Test;
# RT 66588
{
my $ro_call = 0;
my $rw_call = 0;
multi sub uno_mas( Int $ro ) { $ro_call++; return 1 + $ro }
multi sub uno_mas( Int $rw is rw ) { $rw_call++; return ++$rw }
is uno_mas(42), 43, 'multi works with constant';
is $ro_call, 1, 'read-only multi was called';
my $x = 99;
is uno_mas( $x ), 100, 'multi works with variable';
is $x, 100, 'variable was modified';
is $rw_call, 1, 'read-write multi was called';
}
done;
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.