# HG changeset patch # User mjsousa # Date 1414239432 -3600 # Node ID 8739d825993238e17e2bbb00a02d3b5ed9899286 # Parent c2ef93412407ca709aca57a73a833dc0b3ad6b7f Fix bug: set the scope annotation in deref_operators used inside structs diff -r c2ef93412407 -r 8739d8259932 stage3/fill_candidate_datatypes.cc --- a/stage3/fill_candidate_datatypes.cc Sat Oct 25 11:28:48 2014 +0100 +++ b/stage3/fill_candidate_datatypes.cc Sat Oct 25 13:17:12 2014 +0100 @@ -1966,6 +1966,9 @@ if (symbol->candidate_datatypes.size() == 1) // narrow the symbol->datatype for this symbol as explained above! symbol->datatype = symbol->candidate_datatypes[0]; + + /* Since the deref_operator_c may be used inside structures, we must handle set the 'scope' annotation here too! */ + symbol->scope = symbol->exp->scope; return NULL; }