# HG changeset patch
# User mjsousa
# Date 1377255968 -3600
# Node ID 079ab7d4b728961a9b0945fee44f598f42e66ed4
# Parent  24d0be6c31f7abddb85beff1200eb514eab0e240
Recursively check the datatype compatibility of values/expressions passed in function/FB invocations.

diff -r 24d0be6c31f7 -r 079ab7d4b728 stage3/print_datatypes_error.cc
--- 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);
 				}
 			}
 	}