On Tue Nov 30 05:36:43 2010, [email protected] wrote:
> 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).
> 
> 
> 

It now warns on the first statement, but proceeds to NPA on the last:

09:31 < [Coke]> rakudo: my $.foo; say "alive"; $.foo # RT 80008
09:32 <+p6eval> rakudo ce5cca: OUTPUT«Useless declaration of a has-scoped
                method in mainline␤alive␤Null PMC access in find_method('foo')␤
                in block <anon> at /tmp/SJaI203Lww:1␤  in <anon> at
                /tmp/SJaI203Lww:1␤»


-- 
Will "Coke" Coleda

Reply via email to