Commit a5ec19b6 authored by Robert Bradshaw's avatar Robert Bradshaw

Avoid compiler crash on failing type paremeter deduction.

parent c492bab6
...@@ -3501,6 +3501,9 @@ class CppClassType(CType): ...@@ -3501,6 +3501,9 @@ class CppClassType(CType):
def deduce_template_params(self, actual): def deduce_template_params(self, actual):
if self == actual: if self == actual:
return {} return {}
elif not hasattr(actual, 'template_type'):
# Untemplated type?
return None
# TODO(robertwb): Actual type equality. # TODO(robertwb): Actual type equality.
elif self.empty_declaration_code() == actual.template_type.empty_declaration_code(): elif self.empty_declaration_code() == actual.template_type.empty_declaration_code():
return reduce( return reduce(
......
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