Skip to content

Commit 59626f6

Browse files
committed
Test
1 parent a38c0ab commit 59626f6

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/NHibernate/Linq/Visitors/HqlGeneratorExpressionVisitor.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -623,14 +623,7 @@ protected HqlTreeNode VisitConditionalExpression(ConditionalExpression expressio
623623
? VisitExpression(expression.IfFalse).ToArithmeticExpression()
624624
: null);
625625

626-
HqlExpression @case = _hqlTreeBuilder.Case(new[] {_hqlTreeBuilder.When(test, ifTrue)}, ifFalse);
627-
628-
// If both operands are parameters, HQL will not be able to determine the resulting type before
629-
// parameters binding. But it has to compute result set columns type before parameters are bound,
630-
// so an artificial cast is introduced to hint HQL at the resulting type.
631-
return expression.Type == typeof(bool) || expression.Type == typeof(bool?) || !HqlIdent.SupportsType(expression.Type)
632-
? @case
633-
: _hqlTreeBuilder.TransparentCast(@case, expression.Type);
626+
return _hqlTreeBuilder.Case(new[] {_hqlTreeBuilder.When(test, ifTrue)}, ifFalse);
634627
}
635628

636629
protected HqlTreeNode VisitSubQueryExpression(SubQueryExpression expression)

0 commit comments

Comments
 (0)