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

.enums method of enumaration type should returns Map not Hash #5315

Closed
p6rt opened this issue May 12, 2016 · 5 comments
Closed

.enums method of enumaration type should returns Map not Hash #5315

p6rt opened this issue May 12, 2016 · 5 comments

Comments

@p6rt
Copy link

p6rt commented May 12, 2016

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

Searchable as RT128138$

@p6rt
Copy link
Author

p6rt commented May 12, 2016

From @salortiz

<sortiz> m​: enum Foo <a b>; Foo.enums.WHAT.say; # Why Hash and not Map?
<camelia> rakudo-moar 1e5df4​: OUTPUT«(Hash)␤»
<gfldex> m​: enum Foo <a b>; Foo.enums<c> = 2; dd Foo.enums;
<camelia> rakudo-moar 1e5df4​: OUTPUT«{​:a(0), :b(1), :c(2)}␤»
<gfldex> m​: enum Foo <a b>; Foo.enums<c> = 2; dd Foo.enums; say Foo​::a; say Foo​::c;
<camelia> rakudo-moar 1e5df4​: OUTPUT«{​:a(0), :b(1), :c(2)}␤a␤Could not find symbol '&c'␤ in block <unit> at /tmp/l6HF74YgT0 line 1␤␤Actually thrown at​:␤ in block <unit> at /tmp/l6HF74YgT0 line 1␤␤»
<gfldex> sortiz​: because of a lack of rakudobug it seams
<sortiz> jnthn, Do you agree that Map is a better option?
<jnthn> sortiz​: I'd say so...

@p6rt
Copy link
Author

p6rt commented May 13, 2016

From @lizmat

Fixed with d31495f , closable with tests

On 12 May 2016, at 18​:15, Salvador Ortiz (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Salvador Ortiz
# Please include the string​: [perl #​128138]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=128138 >

<sortiz> m​: enum Foo <a b>; Foo.enums.WHAT.say; # Why Hash and not Map?
<camelia> rakudo-moar 1e5df4​: OUTPUT«(Hash)␤»
<gfldex> m​: enum Foo <a b>; Foo.enums<c> = 2; dd Foo.enums;
<camelia> rakudo-moar 1e5df4​: OUTPUT«{​:a(0), :b(1), :c(2)}␤»
<gfldex> m​: enum Foo <a b>; Foo.enums<c> = 2; dd Foo.enums; say Foo​::a; say Foo​::c;
<camelia> rakudo-moar 1e5df4​: OUTPUT«{​:a(0), :b(1), :c(2)}␤a␤Could not find symbol '&c'␤ in block <unit> at /tmp/l6HF74YgT0 line 1␤␤Actually thrown at​:␤ in block <unit> at /tmp/l6HF74YgT0 line 1␤␤»
<gfldex> sortiz​: because of a lack of rakudobug it seams
<sortiz> jnthn, Do you agree that Map is a better option?
<jnthn> sortiz​: I'd say so...

@p6rt
Copy link
Author

p6rt commented May 13, 2016

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

@p6rt
Copy link
Author

p6rt commented Jul 4, 2016

From @zoffixznet

Thank you.

Tests added​: Raku/roast@9d3a8f6c34

@p6rt
Copy link
Author

p6rt commented Jul 4, 2016

@zoffixznet - 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