Permalink
Browse files

[t/spec] Test for RT 66822: required param after optional param

git-svn-id: http://svn.pugscode.org/pugs@29161 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent eb8297f commit 9ff2f3a070a306e2c1edd411c80533417fcc7e37 kyle committed Nov 20, 2009
Showing with 7 additions and 1 deletion.
  1. +7 −1 S06-signature/optional.t
View
@@ -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

0 comments on commit 9ff2f3a

Please sign in to comment.