Skip to content

Commit

Permalink
RakuAST: fix regression in require
Browse files Browse the repository at this point in the history
Fixes "No such method 'is-resolved' for invocant of type
'RakuAST::Declaration::Import'". No idea how this could slip through.

lizmat++ for spotting
  • Loading branch information
niner committed Apr 14, 2024
1 parent 6988368 commit e52a456
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Raku/ast/statements.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -1847,8 +1847,8 @@ class RakuAST::Statement::Require
my $top := @components.shift.name;
$existing-path := QAST::Op.new(:op<call>, :name('&infix:<,>'));
my $existing-lookup := $!existing-lookup;
if $existing-lookup.is-resolved {
my $existing := $existing-lookup.resolution.compile-time-value;
if $existing-lookup && nqp::istype($existing-lookup, RakuAST::CompileTimeValue) {
my $existing := $existing-lookup.compile-time-value;
$current := nqp::who($existing);
$top-existing := QAST::WVal.new(:value($existing));
$existing-path.push: QAST::SVal.new(:value($top));
Expand Down

0 comments on commit e52a456

Please sign in to comment.