On Sat Aug 01 05:24:56 2015, [email protected] wrote:
> https://github.com/rakudo/rakudo/blob/nom/src/core/Exception.pm
> 
> "Illegal post-declaration of dynamic variable '$.symbol';\n" ~
> "earlier access must be written as CALLER::<$.symbol>\n" ~
> "if that's what you meant"
> 
> This message was useful but it took me while to figure out that what I
> wanted was CALLERS::<$*dynamic> rather than CALLER. CALLER will only work
> if there is a  my $*dynamic made in the caller but this is not necessarily
> the case. Should probably change exception to reflect that.

Maybe I misunderstood this bug report, but this seems to be fixed with commit  
https://github.com/rakudo/rakudo/commit/16e5d295dc.

$ perl6 -e 'say $*a; my $*a'
===SORRY!=== Error while compiling -e
Illegal post-declaration of dynamic variable '$*a';
earlier access must be written as CALLERS::<$*a>
if that's what you meant
at -e:1
------> say $*a; my $*a⏏<EOL>
    expecting any of:
        constraint

The only test for X::Dynamic::Postdeclaration in roast is

  throws-like 'say $*a; my $*a;', X::Dynamic::Postdeclaration, symbol => '$*a';

So, is this ticket closeable?

Reply via email to