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

Nameless @/% sigils with is rw don't get complained about #6540

Open
p6rt opened this issue Sep 19, 2017 · 1 comment
Open

Nameless @/% sigils with is rw don't get complained about #6540

p6rt opened this issue Sep 19, 2017 · 1 comment
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Sep 19, 2017

Migrated from rt.perl.org#132133 (status was 'new')

Searchable as RT132133$

@p6rt
Copy link
Author

p6rt commented Sep 19, 2017

From @zoffixznet

IRC finding​: https://irclog.perlgeek.de/perl6/2017-09-19#i_15189180

If you use `is rw` on @​ or % sigiled params, you get an error saying it's not needed​:

  <Zoffix__> m​: -> @​a is rw {}
  <camelia> rakudo-moar b66f5e​: OUTPUT​: «===SORRY!=== Error while compiling <tmp>␤For parameter '@​a', '@​' sigil containers don't need 'is rw' to be writable␤Can only use 'is rw' on a scalar ('$' sigil) parameter, not '@​a'␤at <tmp>​:1␤»
  <Zoffix__> m​: -> %a is rw {}
  <camelia> rakudo-moar b66f5e​: OUTPUT​: «===SORRY!=== Error while compiling <tmp>␤For parameter '%a', '%' sigil containers don't need 'is rw' to be writable␤Can only use 'is rw' on a scalar ('$' sigil) parameter, not '%a'␤at <tmp>​:1␤»

But the same error doesn't appear when applying `is rw` on nameless params​:

  <Zoffix__> m​: -> @​ is rw {}
  <camelia> rakudo-moar b66f5e​: ( no output )
  <Zoffix__> m​: -> % is rw {}
  <camelia> rakudo-moar b66f5e​: ( no output )

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant