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

Null PMC bug when code confused as hash #1211

Closed
p6rt opened this issue Aug 7, 2009 · 8 comments
Closed

Null PMC bug when code confused as hash #1211

p6rt opened this issue Aug 7, 2009 · 8 comments

Comments

@p6rt
Copy link

p6rt commented Aug 7, 2009

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

Searchable as RT68298$

@p6rt
Copy link
Author

p6rt commented Aug 7, 2009

From @colomon

colomon​: rakudo​: (1..3).map({$_ => $_*$_}).perl.say
p6eval​: rakudo e5a63d​: OUTPUT«Use of uninitialized value␤Use of
uninitialized value␤Use of uninitialized value␤Null PMC access in
invoke()␤in Main (/tmp/xCUuiEBOsh​:2)␤»

I understand that this code should not work, but it shouldn't Null PMC
access either.

On the other hand, not sure if this one should work or not​:

colomon​: rakudo​: (1..3).map({$_ => $_*$_;}).perl.say
p6eval​: rakudo e5a63d​: OUTPUT«Use of uninitialized value␤Use of
uninitialized value␤Use of uninitialized value␤Null PMC access in
invoke()␤in Main (/tmp/8McBNVU08o​:2)␤»

--
Solomon Foster​: colomon@​gmail.com
HarmonyWare, Inc​: http://www.harmonyware.com

@p6rt
Copy link
Author

p6rt commented Apr 30, 2010

From @bbkr

It's

ppabian@​b-gr-dev​:~/rakudo$ perl6 -e '(1..3).map({$_ => $_*$_}).perl.say'
No candidates found to invoke

on Moscow build.

@p6rt
Copy link
Author

p6rt commented Apr 30, 2010

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

@p6rt
Copy link
Author

p6rt commented Jun 30, 2010

From @bbkr

And

$ perl6 -e '(1..3).map({$_ => $_*$_}).perl.say'
Use of uninitialized value in numeric context
Use of uninitialized value in numeric context
No candidates found to invoke
  in main program body at line 1

on Kiev build

@p6rt
Copy link
Author

p6rt commented Sep 11, 2011

From @bbkr

NOM

bbkr​:nom bbkr$ ./perl6 -e '(1..3).map({$_ => $_*$_}).perl.say'
Use of uninitialized value in numeric context
Use of uninitialized value in numeric context
Use of uninitialized value in string context
Method 'count' not found for invocant of class 'Hash'
  in method reify at src/gen/CORE.setting​:3634
  in method reify at src/gen/CORE.setting​:3539
  in method gimme at src/gen/CORE.setting​:3876
  in method perl at src/gen/CORE.setting​:4055

@p6rt
Copy link
Author

p6rt commented May 29, 2012

From @diakopter

On Sun Sep 11 02​:50​:58 2011, bbkr wrote​:

NOM

bbkr​:nom bbkr$ ./perl6 -e '(1..3).map({$_ => $_*$_}).perl.say'
Use of uninitialized value in numeric context
Use of uninitialized value in numeric context
Use of uninitialized value in string context
Method 'count' not found for invocant of class 'Hash'
in method reify at src/gen/CORE.setting​:3634
in method reify at src/gen/CORE.setting​:3539
in method gimme at src/gen/CORE.setting​:3876
in method perl at src/gen/CORE.setting​:4055

new behavior. However, note what happens when I add another {} around
it.

15​:50 < diakopter> r​: (1..3).map({$_ => $_*$_}).perl.say
15​:51 <+p6eval> rakudo 3b1596​: OUTPUT«use of uninitialized variable $_
of type Any in
  numeric context in block <anon> at
/tmp/2hcyev09Jp​:1␤␤use of uninitialized
  variable $_ of type Any in numeric context in block
<anon> at
  /tmp/2hcyev09Jp​:1␤␤use of uninitialized variable $!key
of type Any in
  string c…
15​:51 < diakopter> r​: (1..3).map({{$_ => $_*$_}}).perl.say
15​:51 <+p6eval> rakudo 3b1596​: OUTPUT«({"1" => 1}, {"2" => 4}, {"3" =>
9}).list␤»

@p6rt
Copy link
Author

p6rt commented Dec 29, 2012

From @moritz

Now tested in S06-other/anon-hashes-vs-blocks.t

@p6rt
Copy link
Author

p6rt commented Dec 29, 2012

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

@p6rt p6rt closed this as completed Dec 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant