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

Parrot Undef type leaking through when doing .hash on the result of a .map of a range in Rakudo #2690

Closed
p6rt opened this issue Mar 29, 2012 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Mar 29, 2012

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

Searchable as RT112116$

@p6rt
Copy link
Author

p6rt commented Mar 29, 2012

From @masak

<moritz> r​: constant %escapes = (^255).map({; chr($_) => sprintf
'%%%02X', $_ }).hash; say %escapes<e>
<p6eval> rakudo 018b27​: OUTPUT«===SORRY!===␤invoke() not implemented
in class 'Undef'␤»
<moritz> r​: constant $a = (^255).map({; $_ => $_ }).hash;
<p6eval> rakudo 018b27​: OUTPUT«===SORRY!===␤invoke() not implemented
in class 'Undef'␤»
<moritz> r​: constant $a = (^255).hash;
<p6eval> rakudo 018b27​: OUTPUT«===SORRY!===␤Odd number of elements
found where hash expected␤»
<moritz> r​: constant $a = (^256).hash;
<p6eval> rakudo 018b27​: ( no output )
<moritz> masak​: wanna submit rakudobug?
* masak submits rakuodbug

@p6rt
Copy link
Author

p6rt commented Mar 30, 2012

From @moritz

note that this only happens within a constant declaration, ie evaluation
at compile time.

@p6rt
Copy link
Author

p6rt commented Mar 30, 2012

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

@p6rt
Copy link
Author

p6rt commented Apr 21, 2012

From @jnthn

On Thu Mar 29 13​:21​:56 2012, masak wrote​:

<moritz> r​: constant %escapes = (^255).map({; chr($_) => sprintf
'%%%02X', $_ }).hash; say %escapes<e>
<p6eval> rakudo 018b27​: OUTPUT«===SORRY!===␤invoke() not implemented
in class 'Undef'␤»
<moritz> r​: constant $a = (^255).map({; $_ => $_ }).hash;
<p6eval> rakudo 018b27​: OUTPUT«===SORRY!===␤invoke() not implemented
in class 'Undef'␤»
<moritz> r​: constant $a = (^255).hash;
<p6eval> rakudo 018b27​: OUTPUT«===SORRY!===␤Odd number of elements
found where hash expected␤»
<moritz> r​: constant $a = (^256).hash;
<p6eval> rakudo 018b27​: ( no output )
<moritz> masak​: wanna submit rakudobug?
* masak submits rakuodbug

Fixed;

constant %escapes = (^255).map({; chr($_) => sprintf '%%%02X', $_
}).hash; say %escapes<e>
%65

Tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Jun 27, 2012

From @moritz

Now tested in S04-declarations/constant.t

@p6rt p6rt closed this as completed Jun 27, 2012
@p6rt
Copy link
Author

p6rt commented Jun 27, 2012

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