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

Cannot call private &!a variables in a class in Rakudo #843

Closed
p6rt opened this issue Mar 29, 2009 · 5 comments
Closed

Cannot call private &!a variables in a class in Rakudo #843

p6rt opened this issue Mar 29, 2009 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Mar 29, 2009

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

Searchable as RT64270$

@p6rt
Copy link
Author

p6rt commented Mar 29, 2009

From @masak

<masak> rakudo​: class A { has &!a = { say "OH HAI" }; method foo {
&!a() } };A.new.foo
<p6eval> rakudo 7af829​: OUTPUT«No such attribute '!a' [...]
* masak submits rakudobug

The error message is contradictory, since there obviously is an
attribute '!a'. Using a dot when calling -- &!a.() -- produces the
same result.

@p6rt
Copy link
Author

p6rt commented Apr 11, 2009

From @masak

Some other errors in connection with this​:

$ perl6 -e 'class A { has &!w; method foo { &w() } }; A.foo'
Null PMC access in invoke()
[...]

$ perl6 -e 'class A { has $.w = { say "FOO" }; method foo { $!w() } }; A.new.foo'
Null PMC access in get_pmc_keyed()
[...]

@p6rt
Copy link
Author

p6rt commented Apr 11, 2009

@masak - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented May 20, 2009

From @jnthn

On Sun Mar 29 09​:40​:06 2009, masak wrote​:

<masak> rakudo​: class A { has &!a = { say "OH HAI" }; method foo {
&!a() } };A.new.foo
<p6eval> rakudo 7af829​: OUTPUT«No such attribute '!a' [...]
* masak submits rakudobug

The error message is contradictory, since there obviously is an
attribute '!a'. Using a dot when calling -- &!a.() -- produces the
same result.

Fixed in git 60f709d and spectests added to S12-attributes/instance.t.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented May 20, 2009

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

@p6rt p6rt closed this as completed May 20, 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