This is an automatically generated mail to inform you that tests are now available in t/spec/S06-signature/optional.t
commit 84dd4dc4cd0ad0ff1de9e5295090994d1670c068 Author: kyle <k...@c213334d-75ef-0310-aa23-eaa082d1ae64> Date: Fri Nov 20 21:17:16 2009 +0000 [t/spec] Test for RT 66822: required param after optional param git-svn-id: http://svn.pugscode.org/p...@29161 c213334d-75ef-0310-aa23-eaa082d1ae64 diff --git a/t/spec/S06-signature/optional.t b/t/spec/S06-signature/optional.t index 31cb0d3..74239c2 100644 --- a/t/spec/S06-signature/optional.t +++ b/t/spec/S06-signature/optional.t @@ -3,7 +3,7 @@ use Test; # L<S06/Optional parameters/> -plan 13; +plan *; sub opt1($p?) { defined($p) ?? $p !! 'undef'; } @@ -61,5 +61,11 @@ dies_ok {foo_53814(1,undef,'something_extra',:y(3))}, # 'two commas parse as if undef is between them'; eval_dies_ok 'rt54804( 1, , 3, )', "two commas in a row doesn't parse"; } + +#?rakudo todo 'RT 66822' +eval_dies_ok( 'sub rt66822($opt?, $req) { "$opt, $req" }', + "Can't put required parameter after optional parameters" ); + +done_testing; # vim: ft=perl6