Skip to content

Commit

Permalink
Avoid BOOTStr being passed to Version.new
Browse files Browse the repository at this point in the history
This fixes 'use v6.e.PREVIEW' on the JVM backend. Without the patch
it dies with X::Coerce::Impossible ("Impossible coercion from
'BOOTStr' into 'Str': value is of unacceptable type BOOTStr").
  • Loading branch information
usev6 committed Nov 19, 2020
1 parent 6f31494 commit c015759
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/World.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ class Perl6::World is HLL::World {

for @can_ver_reversed -> $can-ver {
# Skip if tried version doesn't match the wanted one
next unless $vWant.ACCEPTS: my $vCan := $Version.new: $can-ver;
next unless $vWant.ACCEPTS: my $vCan := $Version.new: nqp::box_s($can-ver, self.find_single_symbol('Str', :setting-only));

my $vCanElems := $vCan.parts.elems;
my $can_rev := $vCan.parts.AT-POS: 1;
Expand Down

0 comments on commit c015759

Please sign in to comment.