- 修复 <object> + AsType + (a as BaseEntity) 解析问题;#1427

This commit is contained in:
2881099
2023-05-23 22:25:14 +08:00
parent 6fedb20673
commit 6b84bd79ae
3 changed files with 21 additions and 11 deletions

View File

@ -1748,7 +1748,7 @@ namespace FreeSql.Internal
if (oper2.NodeType == ExpressionType.Parameter)
{
var oper2Parm = oper2 as ParameterExpression;
if (exp2.Type.IsAbstract || exp2.Type.IsInterface || exp2.Type.IsAssignableFrom(oper2Parm.Type))
if (oper2Parm.Type != typeof(object) && (exp2.Type.IsAbstract || exp2.Type.IsInterface || exp2.Type.IsAssignableFrom(oper2Parm.Type)))
expStack.Push(oper2Parm);
else if (oper2Parm.Type != typeof(object) && oper2Parm.Type.IsAssignableFrom(exp2.Type))
expStack.Push(oper2Parm);