Skip to content

Commit

Permalink
Compute offset to contracts
Browse files Browse the repository at this point in the history
The alternative would be to make `Contract`  inherit from `TopLevel`, but I'm not confident that wouldn't break other things
  • Loading branch information
frabert authored Mar 28, 2024
1 parent 13d7d9f commit e8bd8e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slither/core/slither_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e8bd8e1

Please sign in to comment.