Skip to content
Snippets Groups Projects
Commit 792027df authored by pycsham's avatar pycsham
Browse files

fixed a minor issue with checking return types of methods

parent 2fb3c978
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
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