Permalink
Browse files

[t/spec] tests for RT #75234, using a metaop in one class hides it fr…

…om a second class

git-svn-id: http://svn.pugscode.org/pugs@30771 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 464f222 commit 65d1a8d828585278ce8ee95155fe82506e252a68 moritz committed May 24, 2010
Showing with 17 additions and 1 deletion.
  1. +17 −1 S03-metaops/reduce.t
View
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 83;
+plan 86;
=begin pod
@@ -210,4 +210,20 @@ is( ([\R~] 'a'..*).batch(8).join(', '), 'a, ba, cba, dcba, edcba, fedcba, gfedcb
is [^^](0, 0, 17), (0 ^^ 0 ^^ 17), '[^^] mix 6';
}
+# RT #75234
+# rakudo had a problem where once-used meta operators weren't installed
+# in a sufficiently global location, so using a meta operator in class once
+# makes it unusable further on
+{
+ class A {
+ method m { return [~] gather for ^3 {take 'a'} }
+ }
+ class B {
+ method n { return [~] gather for ^4 {take 'b'}}
+ }
+ is A.new.m, 'aaa', '[~] works in first class';
+ is B.new.n, 'bbbb', '[~] works in second class';
+ is ([~] 1, 2, 5), '125', '[~] works outside class';
+}
+
# vim: ft=perl6

0 comments on commit 65d1a8d

Please sign in to comment.