From 98052b4ce24ded2689968a43d10479d22eaa04f9 Mon Sep 17 00:00:00 2001
From: pycsham <shampuiyanchloe@gmail.com>
Date: Fri, 28 Feb 2020 21:21:15 -0500
Subject: [PATCH] Attempt to fix abstract methods. Now created some new issues
 that needs to be fixed

---
 TypeNodes.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/TypeNodes.py b/TypeNodes.py
index 1cf778f..d5152a8 100644
--- a/TypeNodes.py
+++ b/TypeNodes.py
@@ -160,7 +160,9 @@ 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 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))
 
     # hierarchy: string[]
-- 
GitLab