Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

44 lines (31 sloc) 0.943 kb
use v6;
use Test;
plan 7;
=begin pod
These are misc. sub argument errors.
=end pod
sub foo (*$x) { 1 }
#?rakudo todo 'RT #61094'
dies_ok { foo(reverse(1,2)) }, 'slurpy args are now bounded (1)';
sub bar (*@x) { 1 }
lives_ok { bar(reverse(1,2)) }, 'slurpy args are now bounded (2)';
#?rakudo 2 todo 'RT #61094'
eval_dies_ok('sub baz ($.x) { ... }', 'parser rejects members as args (1)');
eval_dies_ok '
class Moo {
has $.y;
sub quux ($.x) { 1 };
}',
'parser rejects members as args (2)';
eval_dies_ok 'sub quuux ($?VERSION) { ... }',
'parser rejects magicals as args (1)';
#?rakudo skip 'STD.pm actually parses this - is this test valid?'
eval_dies_ok('sub quuuux ($!) { ... }',
'parser rejects magicals as args (2)');
# RT #64344
{
sub empty_sig() { return }
dies_ok { empty_sig( 'RT #64344' ) },
'argument passed to sub with empty signature';
}
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.