stage3/narrow_candidate_datatypes.cc
changeset 919 8da635655f37
parent 910 a0518971127d
child 933 76324f461aed
equal deleted inserted replaced
918:e9bde0aa93ed 919:8da635655f37
  1410 			r_type = r_expr->candidate_datatypes[j];
  1410 			r_type = r_expr->candidate_datatypes[j];
  1411 			if        (is_widening_compatible(widen_table, l_type, r_type, symbol->datatype, deprecated_operation)) {
  1411 			if        (is_widening_compatible(widen_table, l_type, r_type, symbol->datatype, deprecated_operation)) {
  1412 				l_expr->datatype = l_type;
  1412 				l_expr->datatype = l_type;
  1413 				r_expr->datatype = r_type;
  1413 				r_expr->datatype = r_type;
  1414 				count ++;
  1414 				count ++;
  1415 			} else if ((l_type == r_type) && get_datatype_info_c::is_enumerated(l_type) && get_datatype_info_c::is_BOOL_compatible(symbol->datatype)) {
  1415 			} else if (   /* handle the special case of enumerations */
       
  1416 			              (get_datatype_info_c::is_BOOL_compatible(symbol->datatype) && get_datatype_info_c::is_enumerated(l_type) && (l_type == r_type))
       
  1417 			              /* handle the special case of comparison between REF_TO datatypes */
       
  1418 			           || (get_datatype_info_c::is_BOOL_compatible(symbol->datatype) && get_datatype_info_c::is_ref_to    (l_type) && get_datatype_info_c::is_type_equal(l_type, r_type))) {
  1416 				if (NULL != deprecated_operation)  *deprecated_operation = false;
  1419 				if (NULL != deprecated_operation)  *deprecated_operation = false;
  1417 				l_expr->datatype = l_type;
  1420 				l_expr->datatype = l_type;
  1418 				r_expr->datatype = r_type;
  1421 				r_expr->datatype = r_type;
  1419 				count ++;
  1422 				count ++;
  1420 			}
  1423 			}