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

Two anonymous hashes, arrays, or callables in the same scope interfere in Rakudo #2830

Closed
p6rt opened this issue Jul 19, 2012 · 5 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 19, 2012

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

Searchable as RT114202$

@p6rt
Copy link
Author

p6rt commented Jul 19, 2012

From @masak

<masak> r​: (my %)<a> = 1; say (my %).perl # :)
<p6eval> rakudo cca6d4​: OUTPUT«("a" => 1).hash␤»
<masak> o.O
* masak submits rakudobug
<jnthn> masak​: Wow! :D
<masak> yeah!
<jnthn> masak​: That's kinda awesome but also kinda terrible :)
<masak> anonymous but persistent :)
<masak> luckily this bug has come to the right person...
<jnthn> It's almost too amusing to want to track down and fix :P
<masak> r​: (my @​).push(1, 2, 3); say (my @​).perl
<p6eval> rakudo cca6d4​: OUTPUT«Array.new(1, 2, 3)␤»
<masak> r​: (my $) = "OH HAI"; say (my $)
<p6eval> rakudo cca6d4​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
<masak> oh, that old one.
<masak> r​: (my &) = sub { say "OH HAI" }; (my &)()
<p6eval> rakudo cca6d4​: OUTPUT«OH HAI␤»
<masak> *sigh* :)

Expected​: OUTPUT«().hash␤», etc.

@p6rt
Copy link
Author

p6rt commented Jan 11, 2013

From @jnthn

On Thu Jul 19 13​:12​:50 2012, masak wrote​:

<masak> r​: (my %)<a> = 1; say (my %).perl # :)
<p6eval> rakudo cca6d4​: OUTPUT«("a" => 1).hash␤»
<masak> o.O
* masak submits rakudobug
<jnthn> masak​: Wow! :D
<masak> yeah!
<jnthn> masak​: That's kinda awesome but also kinda terrible :)
<masak> anonymous but persistent :)
<masak> luckily this bug has come to the right person...
<jnthn> It's almost too amusing to want to track down and fix :P
<masak> r​: (my @​).push(1, 2, 3); say (my @​).perl
<p6eval> rakudo cca6d4​: OUTPUT«Array.new(1, 2, 3)␤»
<masak> r​: (my $) = "OH HAI"; say (my $)
<p6eval> rakudo cca6d4​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
<masak> oh, that old one.
<masak> r​: (my &) = sub { say "OH HAI" }; (my &)()
<p6eval> rakudo cca6d4​: OUTPUT«OH HAI␤»
<masak> *sigh* :)

Expected​: OUTPUT«().hash␤», etc.

Fixed now​:

(my %)<a> = 1; say (my %).perl # :)
().hash
(my @​).push(1, 2, 3); say (my @​).perl
Array.new()

Tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Jan 11, 2013

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

@p6rt
Copy link
Author

p6rt commented Jan 14, 2013

From @timo

committed passing tests in b9050972 and the two following commits.

@p6rt
Copy link
Author

p6rt commented Jan 14, 2013

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

@p6rt p6rt closed this as completed Jan 14, 2013
@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