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

self referential variable declaration not picked up #5138

Open
p6rt opened this issue Feb 15, 2016 · 3 comments
Open

self referential variable declaration not picked up #5138

p6rt opened this issue Feb 15, 2016 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 15, 2016

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

Searchable as RT127544$

@p6rt
Copy link
Author

p6rt commented Feb 15, 2016

From @LLFourn

my @​data = 1,{},@​data,"YEWHAT??";
say @​data.perl;

# (\Array_140251854808256 = [1 Array_140251854808256 YEWHAT??])

It's putting the {} before it that makes the check stop working

p 'my @​data = 1,@​data,"YEWHAT??";say @​data'
===SORRY!=== Error while compiling -e
Cannot use variable @​data in declaration to initialize itself
at -e​:1

I had a ',' where a ';' should have been and it slurped up the next line
where I used @​data, and put it into itself. Took me forever to figure it
out!

@p6rt
Copy link
Author

p6rt commented Jul 11, 2016

From @zoffixznet

Still present in today's rakudo de5d9e​:

<Zoffix> m​: my @​data = @​data;
<camelia> rakudo-moar de5d9e​: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Cannot use variable @​data in declaration to initialize itself␤at <tmp>​:1␤------> my @​data = @​⏏data;␤ expecting any of​:␤ term␤»
<Zoffix> m​: my @​data = {}, @​data;
<camelia> rakudo-moar de5d9e​: ( no output )

@p6rt
Copy link
Author

p6rt commented Aug 25, 2016

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

@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