Commit 9c6156c8 authored by Botond Baranyi's avatar Botond Baranyi

Fixed fatal error caused by using a constant initialized with a module...

Fixed fatal error caused by using a constant initialized with a module parameter as array dimensions (issue #495)
Signed-off-by: Botond Baranyi's avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent 8f186725
......@@ -4196,7 +4196,14 @@ bool Type::chk_this_refd_value(Value *value, Common::Assignment *lhs, expected_v
value->set_valuetype(Value::V_ERROR);
return self_ref;
case Assignment::A_CONST:
is_const = true;
if (expected_value == EXPECTED_CONSTANT &&
ass->get_Value()->is_unfoldable(NULL, expected_value)) {
value->error("Referenced constant value cannot be evaluated at compile-time");
error_flag = true;
}
else {
is_const = true;
}
break;
case Assignment::A_OBJECT:
case Assignment::A_OS: {
......
......@@ -16,7 +16,7 @@ include ../../Makefile.personal
SADIRS := ver param template any_from pattern_ref float recof_index \
port_translation mtc_and_system_clause port_map_connect deterministic invoking_function_from_specific_places \
json realtime map_param oop defaultAlternative
json realtime map_param oop defaultAlternative issues
ifdef RT2
SADIRS += deprecated erroneous_attributes template_concat
endif
......
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