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 on my $a vs $^a #3616

Closed
p6rt opened this issue Dec 21, 2014 · 3 comments
Closed

LTA error on my $a vs $^a #3616

p6rt opened this issue Dec 21, 2014 · 3 comments

Comments

@p6rt
Copy link

p6rt commented Dec 21, 2014

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

Searchable as RT123470$

@p6rt
Copy link
Author

p6rt commented Dec 21, 2014

From @lizmat

[13​:39​:33] <lizmat> m​: my $a; sub a { $a = $^b }; a 42 # works
[13​:39​:33] <+camelia> rakudo-moar 713600​: ( no output )
[13​:39​:43] <lizmat> m​: my $a; sub a { $a = $^a }; a 42 # does not work
[13​:39​:44] <+camelia> rakudo-moar 713600​: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/DCMAx3q212​:1␤␤»
[13​:40​:06] <lizmat> I guess $a and $^a take the same lexpad spot
[13​:40​:30] <lizmat> and the $^a this masks the outer $a
[13​:40​:36] <lizmat> *thus
[13​:40​:45] <lizmat> still, an LTA error
[13​:41​:12] <lizmat> rakudobuggable? or DIHWIDT ?
[13​:41​:38] <FROGGS_> std​: my $a; sub a { $a = $^a }; a 42
[13​:41​:39] <+camelia> std 76ccee1​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤$a has already been used as a non-placeholder in the surrounding sub block,␤ so you will confuse the reader if you suddenly declare $^a here at /tmp/yAB7rEr43U line 1​:␤------> �[32mmy $a; sub a { $a = �[33m⏏�[31m$^a }; a 42…»
[13​:42​:15] <FROGGS_> I was about to say something like that :o)
[13​:43​:28] <vendethiel> std++
[13​:44​:14] <FROGGS_> ohh yeah, TimToady++
[13​:44​:42] <FROGGS_> std is a very awesome piece of work, every layer of it
[13​:44​:46] <psch> "you will confuse the reader" - that's pretty great
[13​:45​:09] <psch> "i as a computer don't have any problem with this, but you poor humans will scratch your head, so don't do that" :D
[13​:45​:15] <isBEKaml> yeah, that reads like "DIHWIDT"
[13​:51​:25] <psch> TimToady++ for cute SORRIES
[13​:51​:37] <lizmat> ok, so rakudobuggable since not std compliant

@p6rt
Copy link
Author

p6rt commented Dec 21, 2014

@FROGGS - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Dec 21, 2014
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