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
@a[*] does not work as slice of all indexes #2034
Comments
From sohtil@gmail.comHi! In @a[*], * should mean all indexes of @a, but this does not work in #perl6 2010-08-07 $ ./perl6
$ ./perl6 --version This is Rakudo Perl 6, version 2010.07-86-ge569d66 built on parrot 2.6.0 r48225 |
From radu_cs85@yahoo.comAdded test in S02-builtin_data_types/array.t |
The RT System itself - Status changed from 'new' to 'open' |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S02-builtin_data_types/array.t commit d0df7b06ecf59256f0520d23b54d073cb965050b [t/spec] added test for RT 77072 @a[*] does not work as slice of all indexes Inline Patchdiff --git a/t/spec/S02-builtin_data_types/array.t b/t/spec/S02-builtin_data_types/array.t
index 6a7752d..57c5f38 100644
--- a/t/spec/S02-builtin_data_types/array.t
+++ b/t/spec/S02-builtin_data_types/array.t
@@ -340,6 +340,14 @@ my @array2 = ("test", 1, Mu);
dies_ok { Mu.[0] }, 'but Mu has no .[]';
}
+#RT #77072
+
+#?rakudo skip 'RT 77072 star not working for array indexing yet - code fails'
+{
+ my @a = <1 2 3>;
+ is @a[*], <1 2 3> , 'using * to access all array elements works';
+}
+
done_testing;
# vim: ft=perl6 |
From @pmichaudNow fixed in fca2d3. There's already a spectest for the test, but I'm I also fixed .{*} in this patch, it probably needs tests as well. Pm |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S02-builtin_data_types/array.t commit 84491e4d2d0e0edae629fdcaee3da248f047eb79 [t/spec] Unfudged test for RT 77072 - @a[*] works as expected now. Inline Patchdiff --git a/t/spec/S02-builtin_data_types/array.t b/t/spec/S02-builtin_data_types/array.t
index 57c5f38..e2fc2e8 100644
--- a/t/spec/S02-builtin_data_types/array.t
+++ b/t/spec/S02-builtin_data_types/array.t
@@ -342,7 +342,6 @@ my @array2 = ("test", 1, Mu);
#RT #77072
-#?rakudo skip 'RT 77072 star not working for array indexing yet - code fails'
{
my @a = <1 2 3>;
is @a[*], <1 2 3> , 'using * to access all array elements works'; |
From @moritzHash zen slices now tested in t/spec/S02-builtin_data_types/hash.t. |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#77072 (status was 'resolved')
Searchable as RT77072$
The text was updated successfully, but these errors were encountered: