From 6e1df63507391fc3e2d984fe48461492e2312603 Mon Sep 17 00:00:00 2001 From: PuqiAR Date: Thu, 25 Dec 2025 17:30:56 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=20=E4=BF=AE=E5=A4=8DFor=E5=BE=AA=E7=8E=AF?= =?UTF-8?q?=E6=B1=82=E5=80=BC=E4=BD=BF=E7=94=A8=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?Context=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Evaluator/evaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Evaluator/evaluator.cpp b/src/Evaluator/evaluator.cpp index fb0dcb0..701364e 100644 --- a/src/Evaluator/evaluator.cpp +++ b/src/Evaluator/evaluator.cpp @@ -971,7 +971,7 @@ namespace Fig while (true) // use while loop to simulate for loop, cause we need to check condition type every iteration { - ObjectPtr condVal = eval(forSt->condition, ctx); + ObjectPtr condVal = eval(forSt->condition, loopContext); if (condVal->getTypeInfo() != ValueType::Bool) { throw EvaluatorError(