Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
make sure autogen scopes to current block only
  • Loading branch information
TimToady committed Oct 30, 2015
1 parent 481a9eb commit 11681b8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion S03-metaops/reverse.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 44;
plan 46;

=begin pod
Expand Down Expand Up @@ -102,4 +102,11 @@ throws-like '3 R. "foo"', X::Obsolete, "R. can't do P5 concat";
is &infix:<R/>(1,2), 2, "Meta reverse R/ can autogen";
is &infix:<RR/>(1,2), 0.5, "Meta reverse RR/ can autogen";

sub infix:<op> ($a,$b) { $a - $b }
{
sub infix:<op> ($a,$b) { $a ** $b }
is &infix:<Rop>(2,3), 9, "Meta reverse Rop can autogen with user-defined op";
}
is &infix:<Rop>(2,3), 1, "Meta reverse Rop autogen with user-overridden op stays local to block";

# vim: ft=perl6

0 comments on commit 11681b8

Please sign in to comment.