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

error message when declaring several variables without parentheses in Rakudo #2625

Open
p6rt opened this issue Jan 29, 2012 · 3 comments
Open

error message when declaring several variables without parentheses in Rakudo #2625

p6rt opened this issue Jan 29, 2012 · 3 comments
Labels
LTA

Comments

@p6rt
Copy link

@p6rt p6rt commented Jan 29, 2012

Migrated from rt.perl.org#109300 (status was 'open')

Searchable as RT109300$

@p6rt
Copy link
Author

@p6rt p6rt commented Jan 29, 2012

From @masak

<fasad> so i found out that declaring more than one array on the same
my statement does not work. why ?
<fasad> my @​a, @​b;
<sorear> need parens
<sorear> std​: my @​a, @​b;
<p6eval> std 48335fc​: OUTPUT«===SORRY!===␤Variable @​b is not
predeclared (declarators are tighter than comma, so maybe your 'my'
signature needs parens?) [...] Check failed␤FAILED 00​:01 111m␤»
<fasad> oh
<masak> could have a better error message.
<sorear> masak​: what do you propose?
<masak> sorear​: "Variable @​b not predeclared (did you forget parentheses?)"
<sorear> masak​: you think that's better than what STD already does?
<masak> sorear​: oh!
<masak> sorear​: didn't read properly. :/
<masak> though I do think that "parens", cute as it is, is a less
well-known term than "parentheses".
<fasad> btw, rakudo complains about @​b being not predeclared. Its
warning has room for improvement !
<masak> fasad​: yes.
<masak> rakudo​: my @​a, @​b;
<p6eval> rakudo 9719f7​: OUTPUT«===SORRY!===␤Variable @​b is not
predeclared at line 1, near ";"␤»
* masak submits rakudobug

@p6rt
Copy link
Author

@p6rt p6rt commented Sep 1, 2016

From @MasterDuke17

On Sun Jan 29 01​:34​:05 2012, masak wrote​:

<fasad> so i found out that declaring more than one array on the same
my statement does not work. why ?
<fasad> my @​a, @​b;
<sorear> need parens
<sorear> std​: my @​a, @​b;
<p6eval> std 48335fc​: OUTPUT«===SORRY!===␤Variable @​b is not
predeclared (declarators are tighter than comma, so maybe your 'my'
signature needs parens?) [...] Check failed␤FAILED 00​:01 111m␤»
<fasad> oh
<masak> could have a better error message.
<sorear> masak​: what do you propose?
<masak> sorear​: "Variable @​b not predeclared (did you forget parentheses?)"
<sorear> masak​: you think that's better than what STD already does?
<masak> sorear​: oh!
<masak> sorear​: didn't read properly. :/
<masak> though I do think that "parens", cute as it is, is a less
well-known term than "parentheses".
<fasad> btw, rakudo complains about @​b being not predeclared. Its
warning has room for improvement !
<masak> fasad​: yes.
<masak> rakudo​: my @​a, @​b;
<p6eval> rakudo 9719f7​: OUTPUT«===SORRY!===␤Variable @​b is not
predeclared at line 1, near ";"␤»
* masak submits rakudobug

Current error message​:

perl6 -e 'my @​a, @​b'
===SORRY!=== Error while compiling -e
Variable '@​b' is not declared
at -e​:1
------> my @​a, @​b

perl6 --version
This is Rakudo version 2016.08.1-59-gec9e814 built on MoarVM version 2016.08-23-gfa9528b
implementing Perl 6.c.

Output is also the same with the 2015.09 release.

@p6rt
Copy link
Author

@p6rt p6rt commented Sep 1, 2016

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

@p6rt p6rt added the LTA label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.