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

'when' and 'default' clauses decontainerize stuff in Rakudo #2942

Closed
p6rt opened this issue Oct 20, 2012 · 4 comments
Closed

'when' and 'default' clauses decontainerize stuff in Rakudo #2942

p6rt opened this issue Oct 20, 2012 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Oct 20, 2012

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

Searchable as RT115384$

@p6rt
Copy link
Author

p6rt commented Oct 20, 2012

From @masak

<masak> r​: .say for { a => 1, b => 2 }
<p6eval> rakudo b86628​: OUTPUT«("a" => 1, "b" => 2).hash␤»
<masak> shouldn't flatten, right?
<masak> r​: .say for gather take do given 1 { default { { a => 1, b => 2 } } }
<p6eval> rakudo b86628​: OUTPUT«"a" => 1␤"b" => 2␤»
<masak> also shouldn't flatten, methinks.
<masak> and yet it... does.
<jnthn> If you remove the default?
<masak> r​: .say for gather take do given 1 { { a => 1, b => 2 } }
<p6eval> rakudo b86628​: OUTPUT«("a" => 1, "b" => 2).hash␤»
<masak> either a 'when' or a 'default' is required for the bug to appear.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Oct 27, 2015

From @jnthn

On Sat Oct 20 13​:23​:21 2012, masak wrote​:

<masak> r​: .say for { a => 1, b => 2 }
<p6eval> rakudo b86628​: OUTPUT«("a" => 1, "b" => 2).hash␤»
<masak> shouldn't flatten, right?
<masak> r​: .say for gather take do given 1 { default { { a => 1, b =>
2 } } }
<p6eval> rakudo b86628​: OUTPUT«"a" => 1␤"b" => 2␤»
<masak> also shouldn't flatten, methinks.
<masak> and yet it... does.
<jnthn> If you remove the default?
<masak> r​: .say for gather take do given 1 { { a => 1, b => 2 } }
<p6eval> rakudo b86628​: OUTPUT«("a" => 1, "b" => 2).hash␤»
<masak> either a 'when' or a 'default' is required for the bug to
appear.
* masak submits rakudobug

Both when and default no longer decontainerize. Test coverage added in S04-statements/when.t.

@p6rt
Copy link
Author

p6rt commented Oct 27, 2015

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

@p6rt
Copy link
Author

p6rt commented Oct 27, 2015

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

@p6rt p6rt closed this as completed Oct 27, 2015
@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