Skip to content
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

if statements clobber @_ in Rakudo #1488

Closed
p6rt opened this issue Feb 7, 2010 · 5 comments
Closed

if statements clobber @_ in Rakudo #1488

p6rt opened this issue Feb 7, 2010 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 7, 2010

Migrated from rt.perl.org#72600 (status was 'resolved')

Searchable as RT72600$

@p6rt
Copy link
Author

p6rt commented Feb 7, 2010

From @masak

<masak> rakudo​: sub A (*@​_) {say @​_.perl; if 1 { say @​_.perl } }; A(5, 4)
<p6eval> rakudo 1d4928​: OUTPUT«[5, 4]␤[]␤»
* masak submits rakudobug
<masak> quietfanatic++
<jnthn> wtf?!
<jnthn> shift that bug!
<masak> :)

@p6rt
Copy link
Author

p6rt commented Jun 28, 2010

From @bbkr

works fine on Kiev build
test added in t/spec/S06-signature/slurpy-params.t

@p6rt
Copy link
Author

p6rt commented Jun 28, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jun 28, 2010

@bbkr - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jun 28, 2010
@p6rt
Copy link
Author

p6rt commented Jun 28, 2010

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S06-signature/slurpy-params.t

commit c35c5ea64d78fe461750068f4c03f16727f16c1a
Author​: bbkr <bbkr@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Mon Jun 28 16​:37​:47 2010 +0000

  t[t/spec/S06-signature/slurpy-params.t] tests for RT #​72600 if statements clobber @​_ in Rakudo
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;31482 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S06-signature/slurpy-params.t b/t/spec/S06-signature/slurpy-params.t
index f5d3440..86334b2 100644
--- a/t/spec/S06-signature/slurpy-params.t
+++ b/t/spec/S06-signature/slurpy-params.t
@@ -312,6 +312,17 @@ eval_dies_ok 'sub rt65324(*@x, $oops) { say $oops }',
     is @c[0], 'a', 'slurpy is copy-array works fine, thank you';
 }
 
+# RT #72600
+{
+    sub A (*@_) {
+        is @_, [5, 4], 'slurpy @_ contains proper values';
+        if 1 {
+            is @_, [5, 4], 'slurpy @_ values not clobbered by if statement';
+        }
+    };
+    A(5, 4);
+}
+
 done_testing;
 
 # vim: ft=perl6

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant