Skip to content

Commit

Permalink
Cover potential bugs with META_ASSIGN opts
Browse files Browse the repository at this point in the history
Covers discussed buggy proposals with :U opts:
https://irclog.perlgeek.de/perl6-dev/2018-01-12#i_15681388
  • Loading branch information
zoffixznet committed Jan 12, 2018
1 parent c42d861 commit a497e91
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion S03-operators/assign.t
Expand Up @@ -6,7 +6,7 @@ use Test;
# V
# L<S03/Changes to Perl 5 operators/list assignment operator now parses on the right>

plan 299;
plan 301;


# tests various assignment styles
Expand Down Expand Up @@ -969,4 +969,10 @@ sub l () { 1, 2 };
is-deeply $thunky3, 0, 'orelse= thunks RHS';
}

{ # https://irclog.perlgeek.de/perl6-dev/2018-01-12#i_15681388
my $a; $a -= 2;
is-deeply $a, -2, '-= with :U target gives right result';
throws-like my $b; $b %= 2, Exception, '%= with :U target throws';
}

# vim: ft=perl6

0 comments on commit a497e91

Please sign in to comment.