diff --git a/slither/printers/inheritance/inheritance_graph.py b/slither/printers/inheritance/inheritance_graph.py index 645eadddd..e6b6d53da 100644 --- a/slither/printers/inheritance/inheritance_graph.py +++ b/slither/printers/inheritance/inheritance_graph.py @@ -7,6 +7,7 @@ """ from slither.core.declarations.contract import Contract +from slither.core.solidity_types.user_defined_type import UserDefinedType from slither.utils.inheritance_analysis import InheritanceAnalysis from slither.printers.abstract_printer import AbstractPrinter @@ -62,7 +63,7 @@ class PrinterInheritanceGraph(AbstractPrinter): pattern_shadow = ' %s' pattern_contract_shadow = ' %s (%s)' - if isinstance(var.type.type, Contract): + if isinstance(var.type, UserDefinedType) and isinstance(var.type.type, Contract): if var in self.overshadowing_state_variables: return pattern_contract_shadow % (var_name, var.type.type.name) else: