We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c60405b commit d3ad914Copy full SHA for d3ad914
S02-names/is_dynamic.t
@@ -1,7 +1,7 @@
1
use v6;
2
use Test;
3
4
-plan 22;
+plan 28;
5
6
# not specifically typed
7
{
@@ -67,4 +67,28 @@ plan 22;
67
ok %a<a>.VAR.dynamic, 'dynamic set correctly for reset Int %a<a>';
68
} #4
69
70
+# R#2276
71
+{
72
+ sub visible($type) {
73
+ is $*a, 42, "is \$*a$type visible";
74
+ $*a = 666 if $type;
75
+ }
76
+ sub a($*a) {
77
+ visible('')
78
79
+ sub b($*a is copy) {
80
+ visible(' is copy');
81
+ is $*a, 666, 'did the assignment work with is copy';
82
83
+ sub c($*a is rw) {
84
+ visible(' is rw');
85
+ is $*a, 666, 'did the assignment work with is rw';
86
87
+
88
+ a(42);
89
+ b(42);
90
+ c(my $c = 42);
91
+ is $c, 666, 'did the assignment work pass through with is rw';
92
+}
93
94
# vim: ft=perl6
0 commit comments