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

LTA error message when doing "our $.a" says "(did you mean 'my a'?)" #4407

Closed
p6rt opened this issue Jul 16, 2015 · 4 comments
Closed

LTA error message when doing "our $.a" says "(did you mean 'my a'?)" #4407

p6rt opened this issue Jul 16, 2015 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jul 16, 2015

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

Searchable as RT125625$

@p6rt
Copy link
Author

p6rt commented Jul 16, 2015

From @AlexDaniel

Code​:
our $.a = 5;

Error​:
Potential difficulties​:
  Useless declaration of a has-scoped method in mainline (did you mean
'my a'?)
  at ./test.pl​:2
  ------> our ⏏$.a = 5;

"my a" does not look like a good suggestion.

IRC log with a relevant code piece and a note about "our $!a" producing a
better error message​: http://irclog.perlgeek.de/perl6/2015-07-16#i_10907501

@p6rt
Copy link
Author

p6rt commented Jul 18, 2015

From @jnthn

On Thu Jul 16 11​:49​:15 2015, alex.jakimenko@​gmail.com wrote​:

Code​:
our $.a = 5;

Error​:
Potential difficulties​:
Useless declaration of a has-scoped method in mainline (did you mean
'my a'?)
at ./test.pl​:2
------> our ⏏$.a = 5;

"my a" does not look like a good suggestion.

IRC log with a relevant code piece and a note about "our $!a" producing a
better error message​: http://irclog.perlgeek.de/perl6/2015-07-16#i_10907501

It's better now​:

$ perl6-m -e "our $.a = 5;"
Potential difficulties​:
  Useless generation of accessor method in mainline
  at -e​:1
  ------> our <HERE>$.a = 5;

$ perl6-m -e "my $.a = 5;"
Potential difficulties​:
  Useless generation of accessor method in mainline
  at -e​:1
  ------> my <HERE>$.a = 5;

Test added in S12-attributes/class.t.

@p6rt
Copy link
Author

p6rt commented Jul 18, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt p6rt closed this as completed Jul 18, 2015
@p6rt
Copy link
Author

p6rt commented Jul 18, 2015

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

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