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

.exists returns false on a %h{Any} in a TypedHash #3139

Closed
p6rt opened this issue May 17, 2013 · 6 comments
Closed

.exists returns false on a %h{Any} in a TypedHash #3139

p6rt opened this issue May 17, 2013 · 6 comments

Comments

@p6rt
Copy link

p6rt commented May 17, 2013

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

Searchable as RT118037$

@p6rt
Copy link
Author

p6rt commented May 17, 2013

From @lizmat

[23​:54​:47] <lizmat> r​: my %h{Any}; %h{Any}=1; say (%h{Any}​:p).perl; my @​a=Any; say @​a.perl; say (%h{@​a}​:p).perl
[23​:54​:49] <+camelia> rakudo 9c5650​: OUTPUT«Any => 1␤Array.new(Any)␤use of uninitialized value of type Any in string context in block at /tmp/2ouUnJ18av​:1␤␤((),)␤»
[23​:55​:32] <lizmat> it looks like doing a slice out of an object hash with Any as a key, is not returning the right thing :-(
[23​:55​:57] <lizmat> it works with a scalar​:
[23​:56​:05] <lizmat> r​: my %h{Any}; %h{Any}=1; say (%h{Any}​:p).perl; my @​a=Any; say @​a.perl; say (%h{@​a[0]}​:p).perl
[23​:56​:07] <+camelia> rakudo 9c5650​: OUTPUT«Any => 1␤Array.new(Any)␤Any => 1␤»
[23​:56​:26] <lizmat> masak​: rakudobug ?
[23​:56​:50] <lizmat> (if you agree, I will make it a rakudobug)
[00​:00​:34] <masak> lizmat​: looking, trying to understand with my feeble $work-addled mind.
[00​:01​:08] <masak> lizmat​: yes, that looks buggy.
[00​:01​:17] <lizmat> still golfing down
[00​:01​:47] <lizmat> r​: my %h{Any}; %h{Any}=1; say %h{Any}​:exists
[00​:01​:49] <+camelia> rakudo 9c5650​: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/6PK2DrIS7m​:1␤␤False␤»
[00​:02​:06] <lizmat> masak​: I think that's the problem
[00​:02​:18] <masak> lizmat​: agreed.
[00​:02​:29] <lizmat> r​: my %h{Any}; %h{Any}=1; say %h{Any}; say %h{Any}​:exists
[00​:02​:30] <+camelia> rakudo 9c5650​: OUTPUT«1␤use of uninitialized value of type Any in string context in block at /tmp/30nteXxcOh​:1␤␤False␤»
[00​:02​:47] lizmat submits rakudobug
[00​:02​:51] <masak> yeah, that's self-contradictory.
[00​:02​:54] <masak> lizmat++

@p6rt
Copy link
Author

p6rt commented Nov 14, 2013

From @lizmat

This appears to be fixed.

@p6rt
Copy link
Author

p6rt commented Nov 14, 2013

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

@p6rt
Copy link
Author

p6rt commented Oct 15, 2014

From @usev6

I added a test to S09-hashes/objecthash.t with the following commit​: Raku/roast@85396dd33e

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 15, 2014

From @usev6

I added a test to S09-hashes/objecthash.t with the following commit​: Raku/roast@85396dd33e

@p6rt p6rt closed this as completed Oct 15, 2014
@p6rt
Copy link
Author

p6rt commented Oct 15, 2014

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