Skip to content

Commit 8447ca8

Browse files
Kodi ArferKodi Arfer
authored andcommitted
[inplace.t] Added tests for RT #70676.
1 parent c298bbd commit 8447ca8

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

S03-operators/inplace.t

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Test;
44

55
# L<S03/Assignment operators/A op= B>
66

7-
plan 22;
7+
plan 28;
88

99
{
1010
my @a = (1, 2, 3);
@@ -73,4 +73,22 @@ is ~@b, "a b d e z", "inplace sort";
7373
is @a, [1,2,3], 'worked: @a.=sort';
7474
}
7575

76+
# RT #70676
77+
{
78+
my $x = 5.5;
79+
$x .= Int;
80+
isa_ok $x, Int, '.= Int (type)';
81+
is $x, 5, '.= Int (value)';
82+
83+
$x = 3;
84+
$x .= Str;
85+
isa_ok $x, Str, '.= Str (type)';
86+
is $x, '3', '.= Str (value)';
87+
88+
$x = 15;
89+
$x .= Bool;
90+
isa_ok $x, Bool, '.= Bool (type)';
91+
is $x, True, '.= Bool (value)';
92+
}
93+
7694
# vim: ft=perl6

0 commit comments

Comments
 (0)