diff --git a/slither/core/slither_core.py b/slither/core/slither_core.py index 76220f5ba..4d4460f12 100644 --- a/slither/core/slither_core.py +++ b/slither/core/slither_core.py @@ -209,7 +209,7 @@ def _compute_offsets_from_thing(self, thing: SourceMapping): for offset in range(definition.start, definition.end + 1): if ( - isinstance(thing, TopLevel) + isinstance(thing, (TopLevel, Contract)) or ( isinstance(thing, FunctionContract) and thing.contract_declarer == thing.contract