Skip to content
Snippets Groups Projects
Commit 5063e5b1 authored by Xun Yang's avatar Xun Yang
Browse files

small fix on localvar field access

parent 5388a91e
No related branches found
No related tags found
No related merge requests found
...@@ -182,6 +182,8 @@ class NameNode(ASTNode): ...@@ -182,6 +182,8 @@ class NameNode(ASTNode):
self.myType = TypeStruct("int", None) self.myType = TypeStruct("int", None)
return return
else: else:
if curType.__class__.__name__ in ['ParamNode', 'VarDclNode']:
curType = curType.myType.typePointer
curType = curType.env.getNode(self.IDs[0], 'fieldDcl') curType = curType.env.getNode(self.IDs[0], 'fieldDcl')
# for methods, we want to keep prefixLink pointing to the class for getting method later # for methods, we want to keep prefixLink pointing to the class for getting method later
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment