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 curry * !< $n in Rakudo #2286
Comments
From @masak<uasi> rakudo: say 1, 2 ... * > 3 |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in S02-builtin_data_types/whatever.t commit f94554a2d47ed61f19df5888bd358a97c5f41fb5 [whatever.t] Added tests for RT #80256. Inline Patchdiff --git a/S02-builtin_data_types/whatever.t b/S02-builtin_data_types/whatever.t
index 92b5680..4e1a45e 100644
--- a/S02-builtin_data_types/whatever.t
+++ b/S02-builtin_data_types/whatever.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 62;
+plan 71;
# L<S02/Built-In Data Types/"The * character as a standalone term captures the notion of">
# L<S02/Native types/"If any native type is explicitly initialized to">
@@ -206,6 +206,23 @@ is (0,0,0,0,0,0) >>+>> ((1,2) xx *), <1 2 1 2 1 2>, 'xx * works';
# RT #73162
eval_lives_ok '{*.{}}()', '{*.{}}() lives';
+# RT #80256
+{
+ my $f = * !< 3;
+ isa_ok $f, Code, 'Whatever-currying !< (1)';
+ nok $f(2), 'Whatever-currying !< (2)';
+ ok $f(3), 'Whatever-currying !< (3)';
+ ok $f(4), 'Whatever-currying !< (4)';
+
+ $f = 5 R- *;
+ isa_ok $f, Code, 'Whatever-currying with R- (1)';
+ is $f(7), 2, 'Whatever-currying with R- (2)';
+ is $f(0), -5, 'Whatever-currying with R- (3)';
+
+ dies_ok { &infix:<+>(*, 42) }, '&infix:<+>(*, 42) doesn\'t make a closure';
+ dies_ok { &infix:<R+>(*, 42) }, '&infix:<+>(*, 42) doesn\'t make a closure';
+}
+
done_testing;
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @KodiologistFixed by the patch in RT #80474, which was Rakudo commit cae7f952ad. |
@Kodiologist - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#80256 (status was 'resolved')
Searchable as RT80256$
The text was updated successfully, but these errors were encountered: