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

$^a can be used after $a in a block in Rakudo #847

Closed
p6rt opened this issue Mar 31, 2009 · 6 comments
Closed

$^a can be used after $a in a block in Rakudo #847

p6rt opened this issue Mar 31, 2009 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Mar 31, 2009

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

Searchable as RT64310$

@p6rt
Copy link
Author

p6rt commented Mar 31, 2009

From @masak

<masak> rakudo​: sub foo { my $a = 5; say $^a }; foo(7)
<p6eval> rakudo c01555​: OUTPUT«5␤»
<moritz_> that looks... wrong
<masak> aye.
<masak> bug reporting time.

Compile-time error, perhaps?

@p6rt
Copy link
Author

p6rt commented Apr 30, 2010

From @bbkr

[16​:19] <bbkr> rakudo​: sub foo { my $a = 5; say $^a }; foo(7); #
http://rt.perl.org/rt3/Ticket/Display.html?id=64310 looks like solved,
but I don't know in which S* look for test cases
[16​:19] <p6eval> rakudo c4857a​: OUTPUT«Cannot assign to readonly
value␤current instr.​: '&die' pc 17391 (src/builtins/Junction.pir​:410)␤»

@p6rt
Copy link
Author

p6rt commented Apr 30, 2010

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

@p6rt
Copy link
Author

p6rt commented May 31, 2010

From @kyleha

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

commit 4a6027c4e5adc0ce1b7e83fcd0581e9673c45545
Author​: moritz <moritz@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Mon May 31 19​:38​:19 2010 +0000

  [t/spec] test for RT #​64310, $^a after my $a
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;31030 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S06-signature/positional-placeholders.t b/t/spec/S06-signature/positional-placeholders.t
index 4385a07..5584805 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 7;
+plan 8;
 
 #L<S06/Placeholder variables/>
 
@@ -29,6 +29,9 @@ non_twigil(5);
 eval_dies_ok( ' {$foo; $^foo;}(1) ',
 'A non-twigil variable should not precede a corresponding twigil variable' );
 
+# RT #64310
+eval_dies_ok ' {my $foo; $^foo;}(1) ', 'my $foo; $^foo; is an illegal redeclaration';
+
 # RT #74778
 {
     my $tracker = '';

@p6rt
Copy link
Author

p6rt commented May 31, 2010

From @moritz

Works now, test pass.

@p6rt
Copy link
Author

p6rt commented May 31, 2010

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

@p6rt p6rt closed this as completed May 31, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant