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 disallows methods with a legal reference to @_ in them #1523
Comments
From @masak<masak> rakudo: class X {method x (*@_) {say @_} }; X.new.x(5) |
From @moritzfixed by jnthn++ |
@moritz - Status changed from 'new' to 'resolved' |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S12-methods/instance.t commit af093547fb0e2b08548fada0958b881a778e8b50 [t/spec] test for RT #72940, *@_ in method signature Inline Patchdiff --git a/t/spec/S12-methods/instance.t b/t/spec/S12-methods/instance.t
index efcc6cc..fd9610b 100644
--- a/t/spec/S12-methods/instance.t
+++ b/t/spec/S12-methods/instance.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 31;
+plan 32;
=begin pod
@@ -183,4 +183,13 @@ is AnonInvocant.new().me, AnonInvocant, 'a typed $: as invocant is OK';
is $tracker, 5, ' ... and got right result (implicit)';
}
+# RT #72940
+{
+ class X {
+ method x(*@_) { @_[0] };
+ }
+ is X.new.x('5'), '5', 'can use explicit @_ in method signature';
+
+}
+
# vim: ft=perl6 |
Migrated from rt.perl.org#72940 (status was 'resolved')
Searchable as RT72940$
The text was updated successfully, but these errors were encountered: