Fix detection of datatype errors on IL conditional flow control operators (JMPC, RETC, ...)
authormjsousa
Thu, 22 Aug 2013 07:39:33 +0100
changeset 841 aed36f08545d
parent 840 60cea9fea6e6
child 842 2415912b0aa0
Fix detection of datatype errors on IL conditional flow control operators (JMPC, RETC, ...)
stage3/print_datatypes_error.cc
--- a/stage3/print_datatypes_error.cc	Wed Aug 21 21:56:41 2013 +0100
+++ b/stage3/print_datatypes_error.cc	Thu Aug 22 07:39:33 2013 +0100
@@ -1002,7 +1002,7 @@
 
 
 void *print_datatypes_error_c::handle_conditional_flow_control_IL_instruction(symbol_c *symbol, const char *oper) {
-	if (NULL == symbol->datatype)
+	if (!get_datatype_info_c::is_type_valid(symbol->datatype))
 		STAGE3_ERROR(0, symbol, symbol, "%s operator must be preceded by an IL instruction producing a BOOL value.", oper);
 	return NULL;
 }