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

.classify-list doesn't work with BagHash in Rakudo #4491

Closed
p6rt opened this issue Aug 27, 2015 · 4 comments
Closed

.classify-list doesn't work with BagHash in Rakudo #4491

p6rt opened this issue Aug 27, 2015 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 27, 2015

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

Searchable as RT125923$

@p6rt
Copy link
Author

p6rt commented Aug 27, 2015

From @masak

<colomon> m​: my %b := BagHash.new(); %b.classify-list( {.comb}, 20..40
); say %b.perl
<camelia> rakudo-moar a46b09​: OUTPUT«postcircumfix​:<{ }> not defined
for type Int [...]
<colomon> masak​: ^^
* masak submits rakudobug
<colomon> m​: my %b; %b.classify-list( {.comb}, 20..40 ); say %b.perl
<camelia> rakudo-moar a46b09​: OUTPUT«{"2" => {"0" => [20], "1" =>
[21], "2" => [22], "3" => [23], "4" => [24], "5" => [25], "6" => [26],
"7" => [27], "8" => [28], "9" => [29]}, "3" => {"0" => [30], "1" =>
[31], "2" => [32], "3" => [33], "4" => [34], "5" => [35], "6" => [36],
"7" => [37], "8" …»
<masak> m​: my %b := BagHash.new(); say %b{'foo'}
<camelia> rakudo-moar a46b09​: OUTPUT«0␤»

Notice how postcircumfix​:<{ }> is defined on BagHash, as seen in that
last eval. But something must go wrong inside .classify-list such that
.{} gets called on an Int instead of on the BagHash itself.

@p6rt
Copy link
Author

p6rt commented Sep 24, 2016

From @zoffixznet

Fixed in rakudo/rakudo@8f2279b155
Tests added in Raku/roast@816b913d98

On Thu Aug 27 04​:25​:26 2015, masak wrote​:

<colomon> m​: my %b := BagHash.new(); %b.classify-list( {.comb}, 20..40
); say %b.perl
<camelia> rakudo-moar a46b09​: OUTPUT«postcircumfix​:<{ }> not defined
for type Int [...]
<colomon> masak​: ^^
* masak submits rakudobug
<colomon> m​: my %b; %b.classify-list( {.comb}, 20..40 ); say %b.perl
<camelia> rakudo-moar a46b09​: OUTPUT«{"2" => {"0" => [20], "1" =>
[21], "2" => [22], "3" => [23], "4" => [24], "5" => [25], "6" => [26],
"7" => [27], "8" => [28], "9" => [29]}, "3" => {"0" => [30], "1" =>
[31], "2" => [32], "3" => [33], "4" => [34], "5" => [35], "6" => [36],
"7" => [37], "8" …»
<masak> m​: my %b := BagHash.new(); say %b{'foo'}
<camelia> rakudo-moar a46b09​: OUTPUT«0␤»

Notice how postcircumfix​:<{ }> is defined on BagHash, as seen in that
last eval. But something must go wrong inside .classify-list such that
.{} gets called on an Int instead of on the BagHash itself.

@p6rt
Copy link
Author

p6rt commented Sep 24, 2016

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

@p6rt
Copy link
Author

p6rt commented Sep 24, 2016

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

@p6rt p6rt closed this as completed Sep 24, 2016
@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