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
Two occurences of $^a in a block mess with control flow #1733
Comments
From @sorear# This prints gothere ONCE |
From @moritzOn Thu Apr 29 10:17:29 2010, stefanor@cox.net wrote:
The occurrence of two $^a's adds two positional parameter to the block, So it's really a signature problem, not primarily a problem with control |
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Sat May 01 01:09:55 2010, moritz wrote:
Also an ex-problem...
Given to moritz++ for spectests. Thanks, Jonathan |
@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/S06-signature/positional-placeholders.t commit dd19e4e30646d9098f4eccdad309f77977533d44 [t/spec] test for RT #74778, multiple occurences of $^a should count as a single parameter Inline Patchdiff --git a/t/spec/S06-signature/positional-placeholders.t b/t/spec/S06-signature/positional-placeholders.t
index a458276..4385a07 100644
--- a/t/spec/S06-signature/positional-placeholders.t
+++ b/t/spec/S06-signature/positional-placeholders.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 6;
+plan 7;
#L<S06/Placeholder variables/>
@@ -29,4 +29,13 @@ non_twigil(5);
eval_dies_ok( ' {$foo; $^foo;}(1) ',
'A non-twigil variable should not precede a corresponding twigil variable' );
+# RT #74778
+{
+ my $tracker = '';
+ for 1, 2 {
+ $tracker ~= $^a ~ $^a ~ '|';
+ }
+ is $tracker, '11|22|', 'two occurences of $^a count as one param';
+}
+
# vim: syn=perl6 |
Migrated from rt.perl.org#74778 (status was 'resolved')
Searchable as RT74778$
The text was updated successfully, but these errors were encountered: