diff --git a/TypeNodes.py b/TypeNodes.py index 1f10b1383ee17a6a21c6e11729173f44bc541d27..85d32ee14c4176b520934e3fab373fb9a3e17d92 100644 --- a/TypeNodes.py +++ b/TypeNodes.py @@ -85,9 +85,13 @@ class ClassInterNode(ASTNode): sicOverwritten = False for scc in superClassContains: if type(sic) == type(scc) and sic == scc: - safeReplace(sic, scc, self.name) - sicOverwritten = True - break + # sic is implicitly abstract, if scc is abstract, then it is not replacing sic + # Thus scc will be added to superContains as well (having 1+ abstract methods with same signiture is fine) + # Example: Tests/A3/J1_supermethod_override11/ + if 'abstract' not in scc.mods: + safeReplace(sic, scc, self.name) + sicOverwritten = True + break if not sicOverwritten: superContains.append(sic)