Skip to content

Commit

Permalink
RakuAST: un-break the REPL
Browse files Browse the repository at this point in the history
The current REPL implementation loads the REPL class by running a comp
unit that's just "REPL", i.e. evaluates the class name. It does so by
stariting the compiler with :outer_ctx(nqp::null()). The old frontend
took this as a signal, that the comp unit's result is wanted. The
RakuAST frontend expected a concrete outer_ctx instead.

Fix by adopting the same criteria as the old frontend.
  • Loading branch information
niner committed Jan 29, 2023
1 parent 85240f0 commit 1072872
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Raku/Actions.nqp
Expand Up @@ -300,7 +300,7 @@ class Raku::Actions is HLL::Actions does Raku::CommonActions {

# Sort out sinking; the compilation unit is sunk as a whole if we are
# not in a REPL or EVAL context.
$cu.mark-sunk() unless nqp::isconcrete(%*COMPILING<%?OPTIONS><outer_ctx>);
$cu.mark-sunk() unless nqp::existskey(%*COMPILING<%?OPTIONS>, 'outer_ctx');
$cu.calculate-sink();

# Have check time.
Expand Down

0 comments on commit 1072872

Please sign in to comment.