Navigation Menu

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

X::Dynamic::Postdeclaration s/CALLER::/CALLERS::/ #4451

Closed
p6rt opened this issue Aug 1, 2015 · 7 comments
Closed

X::Dynamic::Postdeclaration s/CALLER::/CALLERS::/ #4451

p6rt opened this issue Aug 1, 2015 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 1, 2015

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

Searchable as RT125733$

@p6rt
Copy link
Author

p6rt commented Aug 1, 2015

From @LLFourn

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.

@p6rt
Copy link
Author

p6rt commented Aug 13, 2015

From @usev6

On Sat Aug 01 05​:24​:56 2015, lloyd.fourn@​gmail.com 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 rakudo/rakudo@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?

1 similar comment
@p6rt
Copy link
Author

p6rt commented Aug 13, 2015

From @usev6

On Sat Aug 01 05​:24​:56 2015, lloyd.fourn@​gmail.com 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 rakudo/rakudo@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?

@p6rt
Copy link
Author

p6rt commented Aug 13, 2015

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

@p6rt
Copy link
Author

p6rt commented Aug 14, 2015

From @LLFourn

Yep I was simply making a comment about the wording. Looks like it has been
fixed :)

On Fri, Aug 14, 2015 at 6​:32 AM, Christian Bartolomaeus via RT <
bugs-comment@​bugs6.perl.org> wrote​:

On Sat Aug 01 05​:24​:56 2015, lloyd.fourn@​gmail.com 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 rakudo/rakudo@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?

@p6rt
Copy link
Author

p6rt commented Aug 14, 2015

From @usev6

On Thu Aug 13 22​:04​:56 2015, lloyd.fourn@​gmail.com wrote​:

Yep I was simply making a comment about the wording. Looks like it has
been fixed :)

Great. I'm closing this ticket as 'resolved'.

@p6rt
Copy link
Author

p6rt commented Aug 14, 2015

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

@p6rt p6rt closed this as completed Aug 14, 2015
@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