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
Overriding of existing operators is partly broken in Rakudo #992
Comments
From @masak<masak> I have a few edge cases I'd like to discuss. |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S06-operator-overloading/sub.t commit 18aadd8fead78ab26ce3d1fd22f30443fbfd310f [t/spec] Test for RT 65638 Inline Patchdiff --git a/t/spec/S06-operator-overloading/sub.t b/t/spec/S06-operator-overloading/sub.t
index 326c3e7..136e9d9 100644
--- a/t/spec/S06-operator-overloading/sub.t
+++ b/t/spec/S06-operator-overloading/sub.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 56;
+plan *;
=begin pod
@@ -372,4 +372,18 @@ Testing operator overloading subroutines
}
+# RT #65638
+{
+ is eval('sub infix:<,>($a, $b) { 42 }; 5, 5'), 42, 'infix:<,>($a, $b)';
+ is eval('sub infix:<,>(Int $x where 1, Int $y where 1) { 42 }; 1, 1'), 42,
+ 'very specific infix:<,>';
+ #?rakudo todo 'RT 65638'
+ is eval('sub infix:<#>($a, $b) { 42 }; 5 # 5'), 42, 'infix:<#>($a, $b)';
+ #?rakudo 2 skip 'Redefinition of infix:<+> causes Test.pm to miscount'
+ is eval('sub infix:<+>() { 42 }; 5 + 5'), 10, 'infix:<+>()';
+ is eval('sub infix:<+>($a, $b) { 42 }; 5 + 5'), 42, 'infix:<+>($a, $b)';
+}
+
+done_testing;
+
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @moritzTest plasses now, closing ticket. |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#65638 (status was 'resolved')
Searchable as RT65638$
The text was updated successfully, but these errors were encountered: