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
readonly trait being passed back to passed variable #1170
Comments
From @finanalystOutput to the following my @a; foo(@a); is The assignment on 2nd line is causing the error. It only occurs is @a is used as an argument to a function, that is then |
From @finanalystworkaround: |
@finanalyst - Status changed from 'new' to 'open' |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S06-signature/passing-arrays.t commit 60dbacba9162ee2fbfbe0517dd94c8a5bbb80582 [t/spec] test for RT #67876 Inline Patchdiff --git a/t/spec/S06-signature/passing-arrays.t b/t/spec/S06-signature/passing-arrays.t
index 5ed9901..711599f 100644
--- a/t/spec/S06-signature/passing-arrays.t
+++ b/t/spec/S06-signature/passing-arrays.t
@@ -4,7 +4,7 @@ use Test;
# L<S06/Parameters and arguments>
# TODO: better smart-linking
-plan 9;
+plan 11;
{
sub count(@a) {
@@ -53,3 +53,16 @@ plan 9;
is(test_two_array([100,5],[20,300]), 120,
"Passing array references to functions accepting arrays works.");
}
+
+# A Rakudo regression
+
+{
+ sub ro_a(@a) { };
+ sub ro_b(@a) { ro_a(@a) };
+ my @x = 1, 2, 4;
+ lives_ok { ro_b(@x) }, 'can pass parameter Array on to next function';
+ #?rakudo todo 'RT 67876'
+ lives_ok { @x = 5, 6 }, '... and that did not make the caller Array ro';
+}
+
+# vim: ft=perl6 |
From @moritzFixed by jnthn's manical magic during the merge of the 'resig2' branch. |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#67876 (status was 'resolved')
Searchable as RT67876$
The text was updated successfully, but these errors were encountered: