Recursively check the datatype compatibility of values/expressions passed in function/FB invocations.
--- a/stage3/print_datatypes_error.cc Fri Aug 23 09:34:04 2013 +0100
+++ b/stage3/print_datatypes_error.cc Fri Aug 23 12:06:08 2013 +0100
@@ -250,10 +250,12 @@
if (function_invocation_error)
/* when handling a IL function call, and an error is found in the first parameter, then we bug out and do not print out any more error messages. */
return;
- }
- else if (!get_datatype_info_c::is_type_valid(param_value->datatype)) {
- function_invocation_error = true;
- STAGE3_ERROR(0, param_value, param_value, "Data type incompatibility for value passed in position %d when invoking %s '%s'", i, POU_str, ((identifier_c *)fcall_data.function_name)->value);
+ } else {
+ if (!get_datatype_info_c::is_type_valid(param_value->datatype)) {
+ function_invocation_error = true;
+ STAGE3_ERROR(0, param_value, param_value, "Data type incompatibility for value passed in position %d when invoking %s '%s'", i, POU_str, ((identifier_c *)fcall_data.function_name)->value);
+ }
+ param_value->accept(*this);
}
}
}