Skip to content

Commit

Permalink
Ensure Foo(...) coercers make Raku objects
Browse files Browse the repository at this point in the history
Str($*USER) was producing a BOOTStr because we return an unboxed `str`
in `IntStr.Str` (which is fine), and since the caller was NQP code it
then ended up boxed as a BOOTStr. Fixes #3308.
  • Loading branch information
jnthn committed Feb 11, 2020
1 parent 4a954cb commit 3a86272
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Perl6/bootstrap.c/BOOTSTRAP.nqp
Expand Up @@ -3592,12 +3592,12 @@ BEGIN {
nqp::die("Cannot coerce to $coercer_name with named arguments")
if +%named;
if +@pos == 1 {
@pos[0]."$coercer_name"()
nqp::hllizefor(@pos[0]."$coercer_name"(), 'Raku')
}
else {
my $list := nqp::create(List);
nqp::bindattr($list, List, '$!reified', @pos);
$list."$coercer_name"()
nqp::hllizefor($list."$coercer_name"(), 'Raku')
}
}
else {
Expand Down

0 comments on commit 3a86272

Please sign in to comment.