Commit 82f33d3f authored by Alexandre Julliard's avatar Alexandre Julliard

widl: Check for mismatched types in ?: expressions.

parent a92d60ef
......@@ -649,6 +649,10 @@ static struct expression_type resolve_expression(const struct expr_loc *expr_loc
check_scalar_type(expr_loc, cont_type, result_first.type);
result_second = resolve_expression(expr_loc, cont_type, e->u.ext);
result_third = resolve_expression(expr_loc, cont_type, e->ext2);
check_scalar_type(expr_loc, cont_type, result_second.type);
check_scalar_type(expr_loc, cont_type, result_third.type);
if (!is_ptr(result_second.type) ^ !is_ptr(result_third.type))
error_loc_info(&expr_loc->v->loc_info, "type mismatch in ?: expression\n" );
/* FIXME: determine the correct return type */
result = result_second;
result.is_variable = FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment