From bf26464089d33c53730d486009386e477b178d80 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sat, 11 Feb 2023 17:44:43 +0800 Subject: [PATCH] Update compiler.h --- src/compiler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler.h b/src/compiler.h index 2e63ea88..d786e5b9 100644 --- a/src/compiler.h +++ b/src/compiler.h @@ -804,7 +804,8 @@ __LISTCOMP: } void compile_for_loop() { - EXPR_FOR_VARS();consume(TK("in")); EXPR_TUPLE(); + EXPR_FOR_VARS();consume(TK("in")); + co()->_rvalue = true; EXPR_TUPLE(); co()->_rvalue = false; emit(OP_GET_ITER); co()->_enter_block(FOR_LOOP); emit(OP_FOR_ITER);