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

Added semantic error for unsupported lazy/fuzzy altstep parameters in 'activate' (bug 537979)



Change-Id: I3a6f012477d09856b97f78c6712c424e6d5c31e3
Signed-off-by: Botond Baranyi's avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent 0a78b0f7
......@@ -9914,8 +9914,12 @@ namespace Ttcn {
bool ret_val = true;
for(size_t i = 0; i < p_aplist->get_nof_pars(); i++) {
ActualPar *t_ap = p_aplist->get_par(i);
if(t_ap->get_selection() != ActualPar::AP_REF) continue;
FormalPar *t_fp = pars_v[i];
if (t_fp->get_eval_type() != NORMAL_EVAL) {
t_ap->get_location()->error("Activating a default altstep with @lazy or "
"@fuzzy parameters is not supported");
}
if(t_ap->get_selection() != ActualPar::AP_REF) continue;
switch(t_fp->get_asstype()) {
case Common::Assignment::A_PAR_VAL_OUT:
case Common::Assignment::A_PAR_VAL_INOUT:
......@@ -10632,6 +10636,22 @@ namespace Ttcn {
DEBUG(level, "actual parameter: erroneous");
}
}
Location* ActualPar::get_location() const
{
switch (selection) {
case AP_VALUE:
return val;
case AP_TEMPLATE:
return temp;
case AP_REF:
return ref;
case AP_DEFAULT:
return act->get_location();
default:
FATAL_ERROR("ActualPar::get_location()");
}
}
// =================================
// ===== ActualParList
......
......@@ -146,6 +146,7 @@ namespace Ttcn {
void set_gen_post_restriction_check(
template_restriction_t p_gen_post_restriction_check)
{ gen_post_restriction_check = p_gen_post_restriction_check; }
Location* get_location() const;
};
/// A collection of actual parameters (parameter list)
......
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