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

Internal error when assigning to a variable that shadows an attribute in Rakudo #2590

Closed
p6rt opened this issue Dec 28, 2011 · 5 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Dec 28, 2011

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

Searchable as RT107232$

@p6rt
Copy link
Author

p6rt commented Dec 28, 2011

From @masak

<masak> nom​: class A { has $x = 5; method foo { say $x } }; A.new.foo
<p6eval> nom a9bead​: OUTPUT«5␤»
<masak> nom​: class A { has $x = 5; method foo { my $x = 42; say $x }
}; A.new.foo
<p6eval> nom a9bead​: OUTPUT«Cannot assign into a PMCNULL container [...]
<masak> huh :)
* masak submits rakudobug
<masak> I... I wasn't even trying! :)

@p6rt
Copy link
Author

p6rt commented Jan 5, 2012

From @jnthn

On Wed Dec 28 13​:07​:10 2011, masak wrote​:

<masak> nom​: class A { has $x = 5; method foo { say $x } }; A.new.foo
<p6eval> nom a9bead​: OUTPUT«5␤»
<masak> nom​: class A { has $x = 5; method foo { my $x = 42; say $x }
}; A.new.foo
<p6eval> nom a9bead​: OUTPUT«Cannot assign into a PMCNULL container [...]
<masak> huh :)
* masak submits rakudobug
<masak> I... I wasn't even trying! :)

Fixed​:

class A { has $x = 5; method foo { my $x = 42; say $x } }; A.new.foo
42

Tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Jan 5, 2012

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

@p6rt
Copy link
Author

p6rt commented Jan 12, 2013

From @moritz

Tested in S12-attributes/instance.t

@p6rt
Copy link
Author

p6rt commented Jan 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