浏览代码

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

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 9 年之前
父节点
当前提交
c84d5c39f3
共有 1 个文件被更改,包括 2 次插入1 次删除
  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;
 }