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

[BUG w/ tests] package A { our %h; %h{'A'} = 2 } Method 'at_key' not found - package A { our %h = ('A' => 2) } Method 'STORE' not found #2547

Closed
p6rt opened this issue Nov 3, 2011 · 8 comments

Comments

@p6rt
Copy link

p6rt commented Nov 3, 2011

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

Searchable as RT102876$

@p6rt
Copy link
Author

p6rt commented Nov 3, 2011

From @ronaldxs

In both cases if you change the "our" to a "my" the problem goes away.

See on IRC​: http://irclog.perlgeek.de/perl6/2011-11-03#i_4657161

UncleFester6 rakudo​: package A { our %h; %h{'A'} = 2 }
  p6eval rakudo c838c1​: OUTPUT«Method 'at_key' not found for invocant of class 'Any'␤ in method postcircumfix​:<{ }> at src/gen/CORE.setting​:1039␤ in<anon> at /tmp/XrWJS1ZeNQ​:1␤ in block<anon> at /tmp/XrWJS1ZeNQ​:1␤ in<anon> at /tmp/XrWJS1ZeNQ​:1␤»
  UncleFester6 rakudo​: package A { my %h; %h{'A'} = 2 }
  p6eval rakudo c838c1​: ( no output )

@p6rt
Copy link
Author

p6rt commented May 29, 2012

From @diakopter

On Thu Nov 03 12​:52​:02 2011, ronaldxs wrote​:

In both cases if you change the "our" to a "my" the problem goes away.

See on IRC​: http://irclog.perlgeek.de/perl6/2011-11-03#i_4657161

UncleFester6 rakudo​: package A { our %h; %h{'A'} = 2 }
p6eval rakudo c838c1​: OUTPUT«Method 'at_key' not found for
invocant
of class 'Any'␤ in method postcircumfix​:<{ }> at
src/gen/CORE.setting​:1039␤ in<anon> at /tmp/XrWJS1ZeNQ​:1␤ in
block<anon> at /tmp/XrWJS1ZeNQ​:1␤ in<anon> at
/tmp/XrWJS1ZeNQ​:1␤»
UncleFester6 rakudo​: package A { my %h; %h{'A'} = 2 }
p6eval rakudo c838c1​: ( no output )

works now. marking testneeded.

18​:41 <diakopter> rakudo​: package A { our %h; %h{'A'} = 2 }
18​:41 <p6eval> rakudo 024843​: ( no output )

@p6rt
Copy link
Author

p6rt commented May 29, 2012

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

@p6rt
Copy link
Author

p6rt commented Jul 16, 2012

From @ronaldxs

works now. marking testneeded.

18​:41 <diakopter> rakudo​: package A { our %h; %h{'A'} = 2 }
18​:41 <p6eval> rakudo 024843​: ( no output )

The first example works but the second still does not AFAICT - our %h =
('A' => 2) Method 'STORE' not found.

I pointed out another related problem on IRC yesterday evening here
http://irclog.perlgeek.de/perl6/2012-07-15#i_5816698.

UncleFester6 r​: my %m; our %o; %m{2} = 4; %o{3} = 6; say %m; say %o;
say %m.perl; say %o.perl
p6eval rakudo ee86a5​: OUTPUT«("2" => 4).hash␤("3" => 6).hash␤("2" =>
4).hash␤{"3" => 6}␤»

jnthn++ later agrees that the last output should not be different from
the others.

So still some work in the area and could be more than one test needed.

Ron

@p6rt
Copy link
Author

p6rt commented Jul 23, 2012

From @ronaldxs

A bit more on this ticket after an IRC discussion​: http://
irclog.perlgeek.de/perl6/2012-07-22#i_5837367

19​:26 UncleFester6 r​: our @​a; say @​a.perl; our %h; say %h.perl
19​:26 p6eval rakudo 3ac8c7​: OUTPUT«Any␤Any␤»

As moritz++ suggests later in the discussion the evaluation of @​a.perl
and %h.perl to Any may be a hint as to the source of the bug. If you
do 'my @​a; say @​a.perl' you get 'Array.new()'.

Also the observation leads to new variations on the bug​:

19​:54 UncleFester6 r​: our @​a; my $x = shift @​a;
19​:54 p6eval rakudo 3ac8c7​: OUTPUT«Cannot call 'shift'; none of
these signatures match​:␤​:(@​a)␤␤ in block <anon> at /tmp/
KwEJ4wnr8k​:1␤␤»

$ ./perl6 -e 'our %h; say values %h'
use of uninitialized value of type Any in string context in block
<anon> at -e​:
1

These indicate that even if "our %h; %h{'A'} = 2" doesn't break right
now there may be some basic related problems to address.

Finally moritz noticed that there is another ticket covering the second
symptom of the subject line of this ticket, RT 100560. I am suggesting
that the two tickets be merged as adequately similar.

Ron

@p6rt
Copy link
Author

p6rt commented May 9, 2013

From @FROGGS

Added tests​: Raku/roast@8c3db86165

@p6rt
Copy link
Author

p6rt commented May 9, 2013

From @FROGGS

Fixed​:
rakudo/rakudo@bfd8508

@p6rt
Copy link
Author

p6rt commented May 9, 2013

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

@p6rt p6rt closed this as completed May 9, 2013
@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