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
Rakudo can`t parse .=sort: {...} #842
Comments
From @ilyabelikinHi there, rakudo> my @a = 1,3,2; say @a.sort: {1} ihrd: std: my @a = 1,2,3; @a.=sort: {1} Ilya |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S03-operators/inplace.t commit 3777ec04081bda1fc2bd7c06a21d2012c63e7853 [t/spec] Tests for RT #64268 Inline Patchdiff --git a/t/spec/S03-operators/inplace.t b/t/spec/S03-operators/inplace.t
index 1f40b20..afa2d81 100644
--- a/t/spec/S03-operators/inplace.t
+++ b/t/spec/S03-operators/inplace.t
@@ -4,7 +4,7 @@ use Test;
# L<S03/Assignment operators/A op= B>
-plan 19;
+plan 24;
#?rakudo skip '.= with spaces'
{
@@ -59,3 +59,16 @@ is ~@b, "a b d e z", "inplace sort";
.=abs;
is($_, 42, '.=foo form works on $_');
}
+
+# RT #64268
+{
+ my @a = 1,3,2;
+ my @b = @a.sort: {1};
+ is @b, (1,3,2), 'works: @a.sort: {1}';
+
+ lives_ok { @a.=sort: {1} }, 'lives: @a.=sort: {1}';
+ is @a, (1,3,2), 'worked: @a.=sort: {1}';
+
+ lives_ok { @a.=sort }, 'lives: @a.=sort';
+ is @a, (1,2,3), 'worked: @a.=sort';
+} |
The RT System itself - Status changed from 'new' to 'open' |
From @kylehaThe tests for this pass now (with Rakudo |
@kyleha - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#64268 (status was 'resolved')
Searchable as RT64268$
The text was updated successfully, but these errors were encountered: