New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use the >> hyperoperator with my-scoped user-defined operators in Rakudo #2017
Comments
From @masak<masak> rakudo: sub postfix:<!>($n) { [*] 1..$n }; say (1, 2, 3)>>! |
From @masakOn Thu Aug 05 10:33:35 2010, masak wrote:
<TiMBuS> rakudo: our sub infix:<+++>($a, $b) { ($a + $b) div 2 }; say 10 >>+++<< 14 |
@masak - Status changed from 'new' to 'open' |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S03-metaops/hyper.t commit 48c239ec94925a836af68bc090f38378cb3b4f4b [t/spec] Added test for RT 77010 use hypers with local scoped user defined operators. Inline Patchdiff --git a/t/spec/S03-metaops/hyper.t b/t/spec/S03-metaops/hyper.t
index 076a726..0d09abd 100644
--- a/t/spec/S03-metaops/hyper.t
+++ b/t/spec/S03-metaops/hyper.t
@@ -708,6 +708,14 @@ my @e;
is ~@r, ~@e, 'dwimmy hyper extends lists ending with * by copying the last element';
}
+# RT #77010
+
+#?rakudo skip 'RT 77010 - use hypers with local scoped user-defined operators'
+{
+ sub infix:<+++>($a, $b) { ($a + $b) div 2 };
+ eval_lives_ok '10 >>+++<< 14', 'can use hypers with local scoped user-defined operators';
+}
+
done_testing;
# vim: ft=perl6 |
From @cokeOn Thu Aug 05 10:33:35 2010, masak wrote:
The first one now works: 10:21 < [Coke]> rakudo: sub postfix:<!>($n) { [*] 1..$n }; say (1, 2, But the second does not: 10:21 < [Coke]> rakudo: sub infix:<+++>($a, $b) { ($a + $b) div 2 }; say -- |
From @moritzThe tests pass now, closing ticket. |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#77010 (status was 'resolved')
Searchable as RT77010$
The text was updated successfully, but these errors were encountered: