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
Indexing an attribute array with a Num causes MMD not to match in Rakudo #1777
Comments
From @masak<finanalyst> rakudo: class A {has |
From @jnthnOn Sat May 22 07:47:38 2010, masak wrote:
Works now: 15:03 <@jnthn> rakudo: class A { has @.m; }; say A.new(:m(1,2,3)).m[2.0] Given to moritz++ for spectesting. Thanks, Jonathan |
The RT System itself - Status changed from 'new' to 'open' |
From @moritzNow tested in t/spec/S12-attributes/instance.t. Cheers, |
@moritz - Status changed from 'open' to 'resolved' |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S12-attributes/instance.t commit 971afd72f736ddb18557b782d16146d783086214 [t/spec] test for RT #75266, indexing array attributes with non-Ints Inline Patchdiff --git a/t/spec/S12-attributes/instance.t b/t/spec/S12-attributes/instance.t
index f1e015e..dd5b9cf 100644
--- a/t/spec/S12-attributes/instance.t
+++ b/t/spec/S12-attributes/instance.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 128;
+plan 129;
=begin pod
@@ -337,6 +337,10 @@ is Foo7e.new.attr, 42, "default attribute value (1)";
is $o.m0, 'a', '@.a[0] works';
is $o.m1, 'b', '@.a[*-2] works';
is $o.m2, 'c', '@.a[*-1] works';
+
+ # RT #75266
+ is ArrayAttribTest.new(a => <x y z>).a[2.0], 'z',
+ 'Can index array attributes with non-integers';
}
{
@@ -573,4 +577,5 @@ is Foo7e.new.attr, 42, "default attribute value (1)";
is TestMethodAll.new(a => 5).all, 5, 'Can call a method all()';
}
+
# vim: ft=perl6 |
Migrated from rt.perl.org#75266 (status was 'resolved')
Searchable as RT75266$
The text was updated successfully, but these errors were encountered: