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

leaking BOOTStr #1800

Open
gfldex opened this Issue May 6, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@gfldex
Contributor

gfldex commented May 6, 2018

BOOTStr seams to be leaking into Perl 6 land. The following example is as golfed as I could get it. Surprisingly the lookup hash is required to trigger this bug.

my regex suffix { <[dhms]> };

my %unit-multipliers = 's' => 1;

put <s>»\
    .match(/<suffix>/)».hash\
    .map(-> % ( Str(Any) :$suffix ) { %unit-multipliers{$suffix} });

Expected Behavior

I would expect BOOTStr not to be there or at least be able to coerce to Str.

Actual Behavior

Type check failed in binding to parameter '<anon>'; expected Any but got BOOTStr (?)
  in block <unit> at /home/dex/projects/perl6/rakudobug/BOOTStr-leakage.p6 line 7

Environment

This is Rakudo version 2018.04-21-g24a907747 built on MoarVM version 2018.04-34-g25f165ad7
implementing Perl 6.c.

make clean and rm-ing .precache did not help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment