stage3/print_datatypes_error.cc
changeset 1041 56ebe2a31b5b
parent 995 ce997a27c516
child 1047 34b733cb6641
--- a/stage3/print_datatypes_error.cc	Mon Apr 03 22:06:40 2017 +0100
+++ b/stage3/print_datatypes_error.cc	Mon Apr 03 22:18:22 2017 +0100
@@ -587,9 +587,9 @@
 void *print_datatypes_error_c::visit(subscript_list_c *symbol) {
 	for (int i = 0; i < symbol->n; i++) {
 		int start_error_count = error_count;
-		symbol->elements[i]->accept(*this);
+		symbol->get_element(i)->accept(*this);
 		/* The following error message will only get printed if the current_display_error_level is set higher than 0! */
-		if ((start_error_count == error_count) && (!get_datatype_info_c::is_type_valid(symbol->elements[i]->datatype)))
+		if ((start_error_count == error_count) && (!get_datatype_info_c::is_type_valid(symbol->get_element(i)->datatype)))
 			STAGE3_ERROR(0, symbol, symbol, "Invalid data type for array subscript field.");
 	}
 	return NULL;