partial fix for issue 74: allow deref of REF in left hand side of assignment (only works in FUNCTIONS for now)
authorMario de Sousa <msousa@fe.up.pt>
Tue, 25 Dec 2018 11:10:11 +0000
changeset 1076 efaa818ef637
parent 1075 c2779ecc2a0c
child 1077 b37de6a9ad7f
partial fix for issue 74: allow deref of REF in left hand side of assignment (only works in FUNCTIONS for now)
stage4/generate_c/generate_c_st.cc
--- a/stage4/generate_c/generate_c_st.cc	Fri Dec 21 17:32:36 2018 +0000
+++ b/stage4/generate_c/generate_c_st.cc	Tue Dec 25 11:10:11 2018 +0000
@@ -937,7 +937,7 @@
 /* B 3.2.1 Assignment Statements */
 /*********************************/
 void *visit(assignment_statement_c *symbol) {
-  symbol_c *left_type = search_varfb_instance_type->get_type_id(symbol->l_exp);
+  symbol_c *left_type = symbol->l_exp->datatype;
   
   if (this->is_variable_prefix_null()) {
     symbol->l_exp->accept(*this);