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

enum treats a Seq of Pairs as a List of Str #5272

Closed
p6rt opened this issue Apr 28, 2016 · 5 comments
Closed

enum treats a Seq of Pairs as a List of Str #5272

p6rt opened this issue Apr 28, 2016 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Apr 28, 2016

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

Searchable as RT128017$

@p6rt
Copy link
Author

p6rt commented Apr 28, 2016

From @gfldex

enum Bits ( (('Bit-' X~ 1..8) Z=> (1, 2, 4 ... 256)) ); dd Bits.enums;
# OUTPUT«{"Bit-1\t1" => 0, "Bit-2\t2" => 1, "Bit-3\t4" => 2, "Bit-4\t8" => 3, "Bit-5\t16" => 4, "Bit-6\t32" => 5, "Bit-7\t64" => 6, "Bit-8\t128" => 7}␤»

# expected​:
# OUTPUT«{"Bit-1" => 1, "Bit-2" => 2, "Bit-3" => 4, "Bit-4" => 8, "Bit-5" => 16, "Bit-6" => 32, "Bit-7" => 64, "Bit-8" => 128}␤»

@p6rt
Copy link
Author

p6rt commented Nov 29, 2017

From @TimToady

Fixed in 754664ed54aea24f9c9162002b6e68aadd311412.

On Thu, 28 Apr 2016 07​:06​:42 -0700, gfldex wrote​:

enum Bits ( (('Bit-' X~ 1..8) Z=> (1, 2, 4 ... 256)) ); dd Bits.enums;
# OUTPUT«{"Bit-1\t1" => 0, "Bit-2\t2" => 1, "Bit-3\t4" => 2, "Bit-
4\t8" => 3, "Bit-5\t16" => 4, "Bit-6\t32" => 5, "Bit-7\t64" => 6,
"Bit-8\t128" => 7}␤»

# expected​:
# OUTPUT«{"Bit-1" => 1, "Bit-2" => 2, "Bit-3" => 4, "Bit-4" => 8,
"Bit-5" => 16, "Bit-6" => 32, "Bit-7" => 64, "Bit-8" => 128}␤»

1 similar comment
@p6rt
Copy link
Author

p6rt commented Nov 29, 2017

From @TimToady

Fixed in 754664ed54aea24f9c9162002b6e68aadd311412.

On Thu, 28 Apr 2016 07​:06​:42 -0700, gfldex wrote​:

enum Bits ( (('Bit-' X~ 1..8) Z=> (1, 2, 4 ... 256)) ); dd Bits.enums;
# OUTPUT«{"Bit-1\t1" => 0, "Bit-2\t2" => 1, "Bit-3\t4" => 2, "Bit-
4\t8" => 3, "Bit-5\t16" => 4, "Bit-6\t32" => 5, "Bit-7\t64" => 6,
"Bit-8\t128" => 7}␤»

# expected​:
# OUTPUT«{"Bit-1" => 1, "Bit-2" => 2, "Bit-3" => 4, "Bit-4" => 8,
"Bit-5" => 16, "Bit-6" => 32, "Bit-7" => 64, "Bit-8" => 128}␤»

@p6rt
Copy link
Author

p6rt commented Dec 12, 2017

From @zoffixznet

Tests​: Raku/roast@37ff3ab58d

@p6rt p6rt closed this as completed Dec 12, 2017
@p6rt
Copy link
Author

p6rt commented Dec 12, 2017

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

@p6rt p6rt added the testneeded label Jan 5, 2020
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