Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #116230: //= with role type objects
  • Loading branch information
moritz committed Jan 12, 2013
1 parent 0bf3677 commit 510ae2a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S03-operators/short-circuit.t
Expand Up @@ -12,7 +12,7 @@ it is closely related to || and && and //.
=end description

plan 82;
plan 83;

my $accum = '';
sub f1($s) { $accum ~= $s; 1 }
Expand Down Expand Up @@ -303,6 +303,14 @@ ok (0 || 0 || 1), '0 || 0 || 1 is true';
is ~@a, '1', '||= works with array on the LHS';
}

# RT #116230
{
my role SomeRole { };
my $x = SomeRole;
$x //= SomeRole.new;
ok $x.defined, '//= can cope with role type objects';
}

done;

# vim: ft=perl6

0 comments on commit 510ae2a

Please sign in to comment.