Skip to content

Commit 2d48e36

Browse files
committed
Fix tests relating to "is context", which apparently now is "is dynamic"
1 parent f4c5ed8 commit 2d48e36

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

S03-binding/scalars.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ eval_dies_ok '0 := 1', 'cannot bind to a literal';
4848
}
4949

5050
sub foo {
51-
my $a is context = "foo";
52-
my $b is context := $a; #OK not used
51+
my $a is dynamic = "foo";
52+
my $b is dynamic := $a; #OK not used
5353
return bar(); # && bar2();
5454
}
5555

S03-operators/context-forcers.t

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,12 @@ sub eval_elsewhere($code){ eval($code) }
139139
ok(?$d, 'it is forced into boolean context');
140140
}
141141

142-
#?rakudo skip 'is context'
143-
#?niecza skip 'Trait context not available on variables'
142+
#?niecza skip 'Trait dynamic not available on variables'
144143
{
145-
my $arrayref is context = list(1,2,3);
146-
my $boo is context = 37;
147-
ok eval_elsewhere('?(@$+arrayref)'), '?(@$arrayref) syntax works';
148-
ok eval_elsewhere('?(@($+arrayref))'), '?(@($arrayref)) syntax works';
144+
my $arrayref is dynamic = list(1,2,3);
145+
my $boo is dynamic = 37;
146+
ok eval_elsewhere('?(@$*arrayref)'), '?(@$arrayref) syntax works';
147+
ok eval_elsewhere('?(@($*arrayref))'), '?(@($arrayref)) syntax works';
149148
}
150149

151150
# L<S03/Symbolic unary precedence/"prefix:<!>">
@@ -167,13 +166,12 @@ sub eval_elsewhere($code){ eval($code) }
167166
ok(!(!$d), 'it is forced into boolean context');
168167

169168
}
170-
#?rakudo skip 'is context'
171169
#?niecza skip 'Trait context not available on variables'
172170
{
173-
my $arrayref is context = list(1,2,3);
171+
my $arrayref is dynamic = list(1,2,3);
174172

175-
ok eval_elsewhere('!(!(@$+arrayref))'), '!(@$arrayref) syntax works';
176-
ok eval_elsewhere('!(!(@($+arrayref)))'), '!(@($arrayref)) syntax works';
173+
ok eval_elsewhere('!(!(@$*arrayref))'), '!(@$arrayref) syntax works';
174+
ok eval_elsewhere('!(!(@($*arrayref)))'), '!(@($arrayref)) syntax works';
177175
}
178176

179177
# int context

S04-statements/lift.t

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,16 @@ plan 15;
7575
ok !('1' ceq 2), 'basic operation with coercion (-)';
7676
}
7777

78+
#?rakudo skip "lift NYI"
7879
{
7980
# I hope I understood this part of specs correctly:
8081
# L<S04/The C<lift> statement prefix/"Everything else within a lift">
8182
# etc.
8283
# IMHO that means that it's OK to use undeclared variables in a lift:
8384
sub f { lift $a + $b };
8485
{
85-
my $a is context = 3;
86-
my $b is context = 4;
86+
my $a is dynamic = 3;
87+
my $b is dynamic = 4;
8788
is f(), 7, 'Can pick up context variables from the caller';
8889
}
8990
eval_dies_ok 'f()',

0 commit comments

Comments
 (0)