Skip to content

Commit 934e16c

Browse files
Update src/NHibernate/Linq/Visitors/NhPartialEvaluatingExpressionVisitor.cs
Co-Authored-By: Frédéric Delaporte <[email protected]>
1 parent cc6cc7e commit 934e16c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/NHibernate/Linq/Visitors/NhPartialEvaluatingExpressionVisitor.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,17 @@ private Expression EvaluateSubtree(Expression subtree)
153153
}
154154
}
155155

156+
#endregion
157+
158+
protected override Expression VisitConstant(ConstantExpression expression)
159+
{
160+
if (expression.Value is Expression value)
161+
{
162+
return EvaluateIndependentSubtrees(value, _preTransformationParameters);
163+
}
164+
return base.VisitConstant(expression);
165+
}
166+
156167
private bool IsVariable(Expression expression, out string path, out object closureContext)
157168
{
158169
Expression childExpression;

0 commit comments

Comments
 (0)