cc: fix field access bug

This commit is contained in:
Paul Mathieu 2021-03-14 18:07:52 -07:00
parent 0a38fdb9fd
commit 48ffd4eb6d

View File

@ -1058,6 +1058,7 @@ class CcInterp(lark.visitors.Interpreter):
else: else:
tree.children[0].type = PointerType(pointed=strct.field_type(ch_field)) tree.children[0].type = PointerType(pointed=strct.field_type(ch_field))
tree.children = [tree.children[0]] tree.children = [tree.children[0]]
self.visit_children(tree)
self._deref(tree) self._deref(tree)
def post_increment(self, tree): def post_increment(self, tree):