From c00e7ad8fe03a63fefe83d602d85645770323d62 Mon Sep 17 00:00:00 2001
From: Xun Yang <x299yang@uwaterloo.ca>
Date: Fri, 6 Mar 2020 19:02:15 -0500
Subject: [PATCH] add missing disambiguateName calls;

---
 ExprPrimaryNodes.py | 4 +++-
 LineNodes.py        | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ExprPrimaryNodes.py b/ExprPrimaryNodes.py
index 2fba479..eb23668 100644
--- a/ExprPrimaryNodes.py
+++ b/ExprPrimaryNodes.py
@@ -410,11 +410,13 @@ class FieldAccessNode(ASTNode):
         self.children.append(self.primary)
         self.children.append(self.ID)
 
-    def disambigName(self):
+    def disambigName(self):    
         if not self.primary: # this implies that the ID has nothing that comes before it
             # helperDisambigName(self.ID)
             self.ID.disambigName()
             # self.right.disambigName()
+        else:
+            self.primary.disambigName()
 
     def checkType(self):
         self.primary.checkType()
diff --git a/LineNodes.py b/LineNodes.py
index 52f1a02..8b43970 100644
--- a/LineNodes.py
+++ b/LineNodes.py
@@ -204,6 +204,10 @@ class ReturnNode(ASTNode):
 
         self.children.append(self.expr)
 
+    def disambigName(self):
+        if self.expr:
+            self.expr.disambigName()
+
     def checkType(self):
         if self.expr:
             self.expr.checkType()
-- 
GitLab