Navigation Menu

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 in strange condition with state variables. #1109

Closed
p6rt opened this issue Jun 29, 2009 · 4 comments
Closed

Null PMC access in strange condition with state variables. #1109

p6rt opened this issue Jun 29, 2009 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jun 29, 2009

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

Searchable as RT67058$

@p6rt
Copy link
Author

p6rt commented Jun 29, 2009

From @kyleha

I discovered this while trying to write a test for another bug report.
Here's the minimal test, which I'll put in
pugs/t/spec/S04-declarations/state-rtXXXXX.t once I get a number back
from this bug report.

use v6;

use Test;

plan 1;

sub bughunt1 { (state $svar) }
{
  sub bughunt2 { state $x //= 17; $x++ }
  #?rakudo todo 'b0rk'
  lives_ok { bughunt2() },
  'a state variable in parens lives with a state variable with //= init';
}

I've tried removing pretty much every part of this test case, and it's
all necessary.

* state $svar in parens in bughunt1.
* braces around bughunt2 definition.
* Assignment and modification of $x
* call to bughunt2

@p6rt
Copy link
Author

p6rt commented Jun 30, 2009

From @jnthn

On Mon Jun 29 10​:34​:57 2009, KyleHa wrote​:

I discovered this while trying to write a test for another bug report.
Here's the minimal test, which I'll put in
pugs/t/spec/S04-declarations/state-rtXXXXX.t once I get a number back
from this bug report.

The bug is fixed and that test now passes. KyleHa++ has moved the test
into state.t, which means it's now tested too. So, resolving ticket!

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Jun 30, 2009

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

@p6rt
Copy link
Author

p6rt commented Jun 30, 2009

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

@p6rt p6rt closed this as completed Jun 30, 2009
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