[Fix] 修复For循环求值使用错误的Context问题

This commit is contained in:
2025-12-25 17:30:56 +08:00
parent 01efa0910d
commit 6e1df63507

View File

@@ -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(