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

Cannot call an anonymous method stored in an array in Rakudo #2432

Closed
p6rt opened this issue Jun 3, 2011 · 5 comments
Closed

Cannot call an anonymous method stored in an array in Rakudo #2432

p6rt opened this issue Jun 3, 2011 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jun 3, 2011

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

Searchable as RT92192$

@p6rt
Copy link
Author

p6rt commented Jun 3, 2011

From @masak

<jnthn> rakudo​: my @​a; for 1..5 -> $i { @​a.push(sub foo { say $i }) };
.() for @​a
<p6eval> rakudo 048573​: OUTPUT«1␤2␤3␤4␤5␤»
<jnthn> rakudo​: my @​a; for 1..5 -> $i { @​a.push(method foo { say $i })
}; .() for @​a
<p6eval> rakudo 048573​: OUTPUT«Useless declaration of has-scoped
Method in a module; add our or my to install it in the lexpad or
namespace␤Subfoo (subid "82_1307132053.89459") has no $!llsig and no
$!lazysig␤ in <anon> at line 7674​:CORE.setting␤ in main program body
at line 1␤»
<jnthn> wow :)
<TimToady> rakudo​: my @​a; for 1..5 -> $i { @​a.push(anon method foo {
say $i }) }; .() for @​a
<p6eval> rakudo 048573​: OUTPUT«Subfoo (subid "82_1307132137.63473")
has no $!llsig and no $!lazysig␤ in <anon> at line 7674​:CORE.setting␤
in main program body at line 1␤»
<TimToady> rakudo​: my @​a; for 1..5 -> $i { @​a.push(anon method foo {
say $i }) }; .($_) for @​a
<p6eval> rakudo 048573​: OUTPUT«Subfoo (subid "82_1307132201.72778")
has no $!llsig and no $!lazysig␤ in <anon> at line 7674​:CORE.setting␤
in main program body at line 1␤»
<jnthn> Not going to bother investigating; just been re-working that
chunk in nom and thought "huh, something looks adrift here..." :)
<masak> jnthn​: hm, is it OK with you if I submit that one to RT?
<jnthn> masak​: Why not? :)
* masak submits rakudobug
<jnthn> masak​: It'll make sure it gets a test that way :)
<jnthn> And...one step closer to 2000 :P
<masak> ;)

@p6rt
Copy link
Author

p6rt commented Sep 28, 2011

From @jnthn

On Fri Jun 03 13​:32​:21 2011, masak wrote​:

<jnthn> rakudo​: my @​a; for 1..5 -> $i { @​a.push(sub foo { say $i }) };
.() for @​a
<p6eval> rakudo 048573​: OUTPUT«1␤2␤3␤4␤5␤»
<jnthn> rakudo​: my @​a; for 1..5 -> $i { @​a.push(method foo { say $i })
}; .() for @​a
<p6eval> rakudo 048573​: OUTPUT«Useless declaration of has-scoped
Method in a module; add our or my to install it in the lexpad or
namespace␤Subfoo (subid "82_1307132053.89459") has no $!llsig and no
$!lazysig␤ in <anon> at line 7674​:CORE.setting␤ in main program body
at line 1␤»
<jnthn> wow :)
<TimToady> rakudo​: my @​a; for 1..5 -> $i { @​a.push(anon method foo {
say $i }) }; .() for @​a
<p6eval> rakudo 048573​: OUTPUT«Subfoo (subid "82_1307132137.63473")
has no $!llsig and no $!lazysig␤ in <anon> at line 7674​:CORE.setting␤
in main program body at line 1␤»
<TimToady> rakudo​: my @​a; for 1..5 -> $i { @​a.push(anon method foo {
say $i }) }; .($_) for @​a
<p6eval> rakudo 048573​: OUTPUT«Subfoo (subid "82_1307132201.72778")
has no $!llsig and no $!lazysig␤ in <anon> at line 7674​:CORE.setting␤
in main program body at line 1␤»
<jnthn> Not going to bother investigating; just been re-working that
chunk in nom and thought "huh, something looks adrift here..." :)
<masak> jnthn​: hm, is it OK with you if I submit that one to RT?
<jnthn> masak​: Why not? :)
* masak submits rakudobug
<jnthn> masak​: It'll make sure it gets a test that way :)
<jnthn> And...one step closer to 2000 :P
<masak> ;)

Now​:

my @​a; for 1..5 -> $i { @​a.push(anon method foo { say $i }) }; .($_)
for @​a
1
2
3
4
5

Just needs tests.

/jnthn

@p6rt
Copy link
Author

p6rt commented Sep 28, 2011

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

@p6rt
Copy link
Author

p6rt commented Sep 28, 2011

From @jnthn

Test added by tadzik++.

@p6rt
Copy link
Author

p6rt commented Sep 28, 2011

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant