File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -8045,7 +8045,7 @@ PP(pp_multiparam)
80458045 else {
80468046 // TODO: Consider collecting up all the names of unrecognised
80478047 // in one string
8048- croak ("Unrecognized named parameter '%s' to subroutine '%" SVf "'" ,
8048+ croak_caller ("Unrecognized named parameter '%s' to subroutine '%" SVf "'" ,
80498049 namepv , S_find_runcv_name ());
80508050 }
80518051 }
@@ -8057,7 +8057,7 @@ PP(pp_multiparam)
80578057
80588058 // TODO: Consider collecting up all the names of missing
80598059 // parameters in one string
8060- croak ("Missing required named parameter '%s' to subroutine '%" SVf "'" ,
8060+ croak_caller ("Missing required named parameter '%s' to subroutine '%" SVf "'" ,
80618061 named -> namepv , S_find_runcv_name ());
80628062 }
80638063 }
Original file line number Diff line number Diff line change @@ -250,3 +250,17 @@ Can't use global %_ in subroutine signature at - line 2, near "(%_"
250250sub t101 ($1) { }
251251EXPECT
252252Illegal operator following parameter in a subroutine signature at - line 2, near "($1"
253+ ########
254+ # NAME missing required named
255+ no warnings 'experimental::signature_named_parameters';
256+ sub f (:$alpha, :$beta) { } ## line 3
257+ f(alpha => 123); ## line 4
258+ EXPECT
259+ Missing required named parameter 'beta' to subroutine 'main::f' at - line 4.
260+ ########
261+ # NAME unrecognised named
262+ no warnings 'experimental::signature_named_parameters';
263+ sub f (:$alpha) { } ## line 3
264+ f(alpha => 123, gamma => 456); ## line 4
265+ EXPECT
266+ Unrecognized named parameter 'gamma' to subroutine 'main::f' at - line 4.
You can’t perform that action at this time.
0 commit comments