Commit ab83542a authored by Botond Baranyi's avatar Botond Baranyi
Browse files

Fixed usage of optional field in value redirect (bug 552529)



Change-Id: I7f8b9c347811cb00fb6cd04f1514ac750dcba719
Signed-off-by: Botond Baranyi's avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent 52861d39
......@@ -10707,8 +10707,14 @@ error:
expression_struct var_ref_expr;
Code::init_expr(&var_ref_expr);
inst_params_str = mputstr(inst_params_str, "&(");
v[i]->get_var_ref()->generate_code(&var_ref_expr);
Reference* ref = v[i]->get_var_ref();
ref->generate_code(&var_ref_expr);
inst_params_str = mputstr(inst_params_str, var_ref_expr.expr);
if (ref->get_refd_assignment()->get_Type()->get_type_refd_last()->
get_field_type(ref->get_subrefs(),
Common::Type::EXPECTED_DYNAMIC_VALUE)->is_optional_field()) {
inst_params_str = mputstr(inst_params_str, "()");
}
inst_params_str = mputc(inst_params_str, ')');
if (var_ref_expr.preamble != NULL) {
expr->preamble = mputstr(expr->preamble, var_ref_expr.preamble);
......
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