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 referring to attributes in roles used by classes which also have attributes in Rakudo #1180

Closed
p6rt opened this issue Jul 28, 2009 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 28, 2009

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

Searchable as RT67992$

@p6rt
Copy link
Author

p6rt commented Jul 28, 2009

From @masak

<masak> rakudo​: role A { has @​!foo; method bar() { @​!foo ~~ (1,2); }
}; class B does A { has $.baz; }; B.new().bar()
<p6eval> rakudo 6999e5​: OUTPUT«Null PMC access in isa()␤in method A[]​::bar [...]
* masak submits rakudobug
<masak> rakudo​: role A { has @​!foo; method bar() { say @​!foo } };
class B does A { has $.baz; }; B.new().bar()
<p6eval> rakudo 6999e5​: OUTPUT«Null PMC access in isa()␤in method A[]​::bar [...]

I've been testing the phenomenon pretty extensively, and it doesn't
seem to matter whether it's @​!foo, $!foo or %!foo -- the error occurs
in all those cases. Also doesn't matter if it's $.baz or $!baz.
Removing $.baz entirely makes the error go away. Defining &bar in B
instead of A also doesn't make any difference.

@p6rt
Copy link
Author

p6rt commented Jul 29, 2009

From @jnthn

On Tue Jul 28 16​:32​:52 2009, masak wrote​:

<masak> rakudo​: role A { has @​!foo; method bar() { @​!foo ~~ (1,2); }
}; class B does A { has $.baz; }; B.new().bar()
<p6eval> rakudo 6999e5​: OUTPUT«Null PMC access in isa()␤in method
A[]​::bar [...]
* masak submits rakudobug
<masak> rakudo​: role A { has @​!foo; method bar() { say @​!foo } };
class B does A { has $.baz; }; B.new().bar()
<p6eval> rakudo 6999e5​: OUTPUT«Null PMC access in isa()␤in method
A[]​::bar [...]

I've been testing the phenomenon pretty extensively, and it doesn't
seem to matter whether it's @​!foo, $!foo or %!foo -- the error occurs
in all those cases. Also doesn't matter if it's $.baz or $!baz.
Removing $.baz entirely makes the error go away. Defining &bar in B
instead of A also doesn't make any difference.

Fixed in git 6999e58 and test added to S14-role/attributes.t.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Jul 29, 2009

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

@p6rt
Copy link
Author

p6rt commented Jul 29, 2009

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

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