From 792027df58ffda6ad71884cabcd8aaf0dd637627 Mon Sep 17 00:00:00 2001 From: pycsham <shampuiyanchloe@gmail.com> Date: Fri, 6 Mar 2020 22:46:05 -0500 Subject: [PATCH] fixed a minor issue with checking return types of methods --- MemberNodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MemberNodes.py b/MemberNodes.py index 872a646..7a0bb3e 100644 --- a/MemberNodes.py +++ b/MemberNodes.py @@ -163,7 +163,7 @@ class MethodNode(ASTNode): if self.myType.name == "void": if n.myType: raise Exception("ERROR: return type of function {} doesn't match with return statement.".format(self.name)) - + return # Checking for non void cases if not self.myType.assignable(n.myType): raise Exception("ERROR: return type of function {} doesn't match with return statement.".format(self.name)) -- GitLab