修复了条件表达式".xxx<bool> = true/false"执行了错误分支,优化了流程的运行。

This commit is contained in:
fengjiayi
2024-12-16 00:58:45 +08:00
parent 8d0258ebea
commit 0372e1fc23
8 changed files with 57 additions and 46 deletions

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Serein.Library.Utils.SereinExpression.Resolver
@@ -24,14 +25,15 @@ namespace Serein.Library.Utils.SereinExpression.Resolver
if (TargetObj is T typedObj)
{
return new ValueTypeConditionResolver<T>
var res = new ValueTypeConditionResolver<T>
{
RangeStart = RangeStart,
RangeEnd = RangeEnd,
Op = Op,
Value = Value,
ArithmeticExpression = ArithmeticExpression,
}.Evaluate(typedObj);
};
return res.Evaluate(typedObj);
}
return false;
}