Skip to content

Commit

Permalink
RakuAST: ensure symbols accessed by BEGIN time code are resolved
Browse files Browse the repository at this point in the history
Generating a compile-time-value may need some lookups to have been
resolved.
  • Loading branch information
niner committed Apr 15, 2024
1 parent c158228 commit 830727e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Raku/ast/code.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ class RakuAST::Code
elsif $name ne '$_' { #TODO figure out why we specifially don't declare $_ in ExpressionThunks
my $decl := $!resolver.resolve-lexical-constant($name);
if $decl {
$decl.IMPL-CHECK($resolver, $context, 1); # Ensure any required lookups are resolved
my $value := $decl.compile-time-value;
$context.ensure-sc($value);
$var := QAST::WVal.new(:$value);
Expand Down

0 comments on commit 830727e

Please sign in to comment.