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
Junctions in array and hash indices don't work in Rakudo #688
Comments
From @masak<moritz_> rakudo: my @a = "foo", "foot"; if @a[all(0,1)] ~~ /^ foo/ { |
From @bbkron Kiev build [13:23] <bbkr> rakudo: my @a = "foo", "foot"; if @a[all(0,1)] ~~ /^ foo/ Taken for tests |
The RT System itself - Status changed from 'new' to 'open' |
From @bbkr[13:24] <bbkr> this test belongs more to array indexing or junctions or So tests added in t/spec/S03-junctions/misc.t (also for Hash). |
@bbkr - Status changed from 'open' to 'resolved' |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S03-junctions/misc.t commit a583bfa22919ece174a30fb011d5fafbd155af1b [t/spec] tests for RT #63126 Junctions in array and hash indices dont work in Rakudo Inline Patchdiff --git a/t/spec/S03-junctions/misc.t b/t/spec/S03-junctions/misc.t
index c579844..d06a97e 100644
--- a/t/spec/S03-junctions/misc.t
+++ b/t/spec/S03-junctions/misc.t
@@ -400,6 +400,21 @@ ok Mu & Mu ~~ Mu, 'Mu & Mu ~~ Mu works';
my @x = (6,7,8);
jok(5 < @x.all, '.all method works on array objects');
}
+
+# RT #63126
+{
+ my @a = "foo", "foot";
+ ok @a[all(0,1)] ~~ /^foo/,
+ 'junction can be used to index Array';
+
+ my %h = (
+ "0" => "foo",
+ "1" => "foot"
+ );
+ ok %h{all(0,1)} ~~ /^foo/,
+ 'junction can be used to index Hash';
+}
+
done_testing();
# vim: ft=perl6 |
Migrated from rt.perl.org#63126 (status was 'resolved')
Searchable as RT63126$
The text was updated successfully, but these errors were encountered: