From a9e1de118eac786e42542742a66effcf8b5901c1 Mon Sep 17 00:00:00 2001 From: pycsham <shampuiyanchloe@gmail.com> Date: Thu, 12 Mar 2020 02:34:25 -0400 Subject: [PATCH] fixing the bug for protected methods check --- ExprPrimaryNodes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ExprPrimaryNodes.py b/ExprPrimaryNodes.py index c00680a..c1a0593 100644 --- a/ExprPrimaryNodes.py +++ b/ExprPrimaryNodes.py @@ -439,8 +439,12 @@ class FieldAccessNode(ASTNode): self.myType = self.ID.myType # check protected - if "protected" in self.ID.prefixLink.mods: - checkProtected(self.ID.prefixLink, self) + try: + if "protected" in self.ID.prefixLink.mods: + checkProtected(self.ID.prefixLink, self) + except: # where there are no mods + return + ################################################################################### -- GitLab