diff --git a/TypeNodes.py b/TypeNodes.py index 05bb041257eaff9addca42c47f9c62756c550af7..5c66ff79fa5812cef180b829186bcf7452735a90 100644 --- a/TypeNodes.py +++ b/TypeNodes.py @@ -156,7 +156,7 @@ class ClassNode(ClassInterNode): # 10. A class that contains (declares or inherits) any abstract methods must be abstract. for con in contains: - if 'abstract' in con.mods and 'abstract' not in self.mods: + if ('abstract' in con.mods or not con.body) and 'abstract' not in self.mods: raise Exception("ERROR: Non-abstract Class '{}' contains an abstract method".format(self.name)) # hierarchy: string[]