Skip to content

Commit d5c0011

Browse files
committed
Fix REPL variable updating bug.
1 parent 5a9b349 commit d5c0011

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/HLL/Compiler.pm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,16 @@ class HLL::Compiler {
128128
};
129129
if nqp::defined($*MAIN_CTX) {
130130
my $cur_ctx := $*MAIN_CTX;
131+
my %seen;
131132
until nqp::isnull($cur_ctx) {
132133
my $pad := nqp::ctxlexpad($cur_ctx);
133134
unless nqp::isnull($pad) {
134135
for $pad {
135136
my str $key := ~$_;
136-
%interactive_pad{$key} := nqp::atkey($pad, $key)
137-
unless nqp::existskey(%interactive_pad, $key);
137+
unless nqp::existskey(%seen, $key) {
138+
%interactive_pad{$key} := nqp::atkey($pad, $key);
139+
%seen{$key} := 1;
140+
}
138141
}
139142
}
140143
$cur_ctx := nqp::ctxouter($cur_ctx);

0 commit comments

Comments
 (0)