Browse Source

Merge pull request #8480 from ghalliday/issue13175

HPCC-13175 Avoid generating invalid code for IF() with type data

Reviewed-By: Shamser Ahmed <shamser.ahmed@lexisnexis.co.uk>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 năm trước cách đây
mục cha
commit
fb1ee1ca1c
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      ecl/hqlcpp/hqlcpp.cpp

+ 2 - 1
ecl/hqlcpp/hqlcpp.cpp

@@ -7384,7 +7384,8 @@ bool HqlCppTranslator::ifRequiresAssignment(BuildCtx & ctx, IHqlExpression * exp
         return true;
     if (trueExpr->queryType() != falseExpr->queryType() && isStringType(expr->queryType()))
         return true;
-    if (expr->queryType()->getTypeCode() == type_decimal)
+    type_t tc = expr->queryType()->getTypeCode();
+    if ((tc == type_decimal) || (tc == type_data))
         return true;
     return false;
 }