Commit a4ad0e54 authored by gsamain's avatar gsamain

Forbid inheritance of non-activable bases for activable classes

parent 4ef45a45
...@@ -1544,6 +1544,8 @@ class CppClassNode(CStructOrUnionDefNode, BlockNode): ...@@ -1544,6 +1544,8 @@ class CppClassNode(CStructOrUnionDefNode, BlockNode):
if self.activable: if self.activable:
activable_base = False activable_base = False
for base_type in base_types_list: for base_type in base_types_list:
if not base_type.activable:
error(self.pos, "Activable class cannot inherit from not activable one.")
activable_base = activable_base or base_type.activable activable_base = activable_base or base_type.activable
if not activable_base: if not activable_base:
from . import Builtin from . import Builtin
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment