Commit 130a65b8 authored by gsamain's avatar gsamain

Fix CppClassType is_subclass crashing with types without base classes

parent bc5041af
...@@ -3795,9 +3795,10 @@ class CppClassType(CType): ...@@ -3795,9 +3795,10 @@ class CppClassType(CType):
def is_subclass(self, other_type): def is_subclass(self, other_type):
if self.same_as_resolved_type(other_type): if self.same_as_resolved_type(other_type):
return 1 return 1
for base_class in self.base_classes: if self.base_classes:
if base_class.is_subclass(other_type): for base_class in self.base_classes:
return 1 if base_class.is_subclass(other_type):
return 1
return 0 return 0
def set_scope(self, scope): def set_scope(self, scope):
......
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