Commit ac9f064c authored by Robert Bradshaw's avatar Robert Bradshaw

Fix template comparison.

parent 74ee82e2
......@@ -3139,7 +3139,6 @@ class CppClassType(CType):
return self.base_declaration_code(base_code, entity_code)
def is_subclass(self, other_type):
# TODO(danilo): Handle templates.
if self.same_as_resolved_type(other_type):
return 1
for base_class in self.base_classes:
......@@ -3151,7 +3150,8 @@ class CppClassType(CType):
if other_type.is_cpp_class:
if self == other_type:
return 1
elif self.template_type and other_type.template_type:
elif (self.cname == other_type.cname and
self.template_type and other_type.template_type):
if self.templates == other_type.templates:
return 1
for t1, t2 in zip(self.templates, other_type.templates):
......
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