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

Null PMC access when accessing $OUTER::_ in a block in Rakudo #1665

Closed
p6rt opened this issue Apr 5, 2010 · 6 comments
Closed

Null PMC access when accessing $OUTER::_ in a block in Rakudo #1665

p6rt opened this issue Apr 5, 2010 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Apr 5, 2010

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

Searchable as RT74076$

@p6rt
Copy link
Author

p6rt commented Apr 5, 2010

From @masak

<cognominal> rakudo​: my @​t; for < a b > { @​t.push( sub {
$OUTER​::_ } ) }; say $_() for @​t
<p6eval> rakudo c41cf3​: OUTPUT«Null PMC access in type() [...]
* masak submits rakudobug
<masak> rakudo​: { say $OUTER​::_ }
<p6eval> rakudo c41cf3​: OUTPUT«Null PMC access in type() [...]
* masak can haz a golfed version

@p6rt
Copy link
Author

p6rt commented Aug 12, 2010

From @coke

On Mon Apr 05 14​:52​:35 2010, masak wrote​:

<cognominal> rakudo​: my @​t; for < a b > { @​t.push( sub {
$OUTER​::_ } ) }; say $_() for @​t
<p6eval> rakudo c41cf3​: OUTPUT«Null PMC access in type() [...]

This no longer has an NPE...

* masak submits rakudobug
<masak> rakudo​: { say $OUTER​::_ }
<p6eval> rakudo c41cf3​: OUTPUT«Null PMC access in type() [...]
* masak can haz a golfed version

but this does.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Aug 12, 2010

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

@p6rt
Copy link
Author

p6rt commented Oct 14, 2011

From @coke

On Wed Aug 11 19​:03​:13 2010, coke wrote​:

On Mon Apr 05 14​:52​:35 2010, masak wrote​:

<cognominal> rakudo​: my @​t; for < a b > { @​t.push( sub {
$OUTER​::_ } ) }; say $_() for @​t
<p6eval> rakudo c41cf3​: OUTPUT�Null PMC access in type() [...]

This no longer has an NPE...

* masak submits rakudobug
<masak> rakudo​: { say $OUTER​::_ }
<p6eval> rakudo c41cf3​: OUTPUT�Null PMC access in type() [...]
* masak can haz a golfed version

but this does.

Both now clean​:

15​:46 < [Coke]> rakudo​: my @​t; for < a b > { @​t.push( sub { $OUTER​::_ }
) };
  say $_() for @​t
15​:46 <+p6eval> rakudo ce15be​: OUTPUT«Too many positional parameters
passed;
  got 1 but expected 0␤ in block <anon> at
/tmp/3c0i82rwTB​:1␤
  in method reify at src/gen/CORE.setting​:3752␤ in
method reify
  at src/gen/CORE.setting​:3657␤ in method reify at
  src/gen/CORE.setting​:3657␤ in method gimme at src/…
15​:46 < [Coke]> rakudo​: { say $OUTER​::_ }
15​:46 <+p6eval> rakudo ce15be​: OUTPUT«Any()␤»

Closable with tests.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Sep 12, 2013

From @moritz

Test added​:

commit 24779f732553abfe32cce9f22c1630a610d3a764
Author​: Moritz Lenz <moritz@​faui2k3.org>
Date​: Thu Sep 12 21​:36​:37 2013 +0200

  RT #​74076​: $OUTER​::_ in a subroutine inside a loop

S02-names-vars/variables-and-packages.t | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

@p6rt
Copy link
Author

p6rt commented Sep 12, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant