diff --git a/compiler2/ttcn3/AST_ttcn3.cc b/compiler2/ttcn3/AST_ttcn3.cc index 52f5f6cdc070f30d324a46c4daf93691302c9354..f4dae1e76772af129a56dad4340ef9591f8814e3 100644 --- a/compiler2/ttcn3/AST_ttcn3.cc +++ b/compiler2/ttcn3/AST_ttcn3.cc @@ -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 diff --git a/compiler2/ttcn3/AST_ttcn3.hh b/compiler2/ttcn3/AST_ttcn3.hh index d956131cac795622feace2992e052a3c23882057..602ad6fb3c0283aee1a0b3cece5a1d0a6c3f5a75 100644 --- a/compiler2/ttcn3/AST_ttcn3.hh +++ b/compiler2/ttcn3/AST_ttcn3.hh @@ -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)