# New Ticket Created by  Paweł Pabian 
# Please include the string:  [perl #80008]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=80008 >


Please check following example:

[14:27] <bbkr> rakudo: my $.foo; say "alive"; $.foo
[14:27] <p6eval> rakudo : OUTPUT«alive␤Null PMC access in find_method('foo')␤  
in main program body at line 22:/tmp/B60vOmq2fl␤»

Declaration of class attribute works in main scope. But accessing it does not.

Either appearance of $.foo in main scope should give error about useless 
usage/declaration (for example like when you try to write "method foo {}" in 
main scope).
This requires STD change I think, because now this syntax is legal.

Or...

Accessing $.foo should not give Null PMC access.


I don't know which one is correct (spec says nothing about class attributes 
used in main scope).



Reply via email to