Skip to content
Snippets Groups Projects
Commit 98052b4c authored by pycsham's avatar pycsham
Browse files

Attempt to fix abstract methods. Now created some new issues that needs to be fixed

parent df658e99
No related branches found
No related tags found
No related merge requests found
...@@ -160,7 +160,9 @@ class ClassNode(ClassInterNode): ...@@ -160,7 +160,9 @@ class ClassNode(ClassInterNode):
# 10. A class that contains (declares or inherits) any abstract methods must be abstract. # 10. A class that contains (declares or inherits) any abstract methods must be abstract.
for con in contains: for con in contains:
if 'abstract' in con.mods and 'abstract' not in self.mods: if 'abstract' in con.mods and (not('abstract' in self.mods)):
raise Exception("ERROR: Non-abstract Class '{}' contains an abstract method".format(self.name))
if (not con.body) and (not ('native' in con.mods)) and (not ('abstract' in self.mods)):
raise Exception("ERROR: Non-abstract Class '{}' contains an abstract method".format(self.name)) raise Exception("ERROR: Non-abstract Class '{}' contains an abstract method".format(self.name))
# hierarchy: string[] # hierarchy: string[]
......
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