Skip to content

Commit df42786

Browse files
committed
Test using a dynamic variable as a named parameter.
1 parent e84c552 commit df42786

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

t/nqp/21-contextual.t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Tests for contextual variables
44

5-
plan(13);
5+
plan(14);
66

77
sub foo() { $*VAR }
88

@@ -75,3 +75,9 @@ ok($passed_value eq "default value", "setting dynamic variables using signatures
7575
bind_using_signature_with_default("not default value");
7676
ok($passed_value eq "not default value", "setting dynamic variables using signatures with default values (passed argument)");
7777

78+
sub bind_using_named(:$*signatured) {
79+
internal();
80+
}
81+
82+
bind_using_named(:signatured("secret value 2"));
83+
ok($passed_value eq "secret value 2", "setting dynamic variables using a named argument");

0 commit comments

Comments
 (0)