fix that Function.can_send_eth() sometimes returns None when it's supposed to return bool

pull/756/head
Maximilian Krueger 4 years ago
parent b5978e83b3
commit 05747d6c75
  1. 1
      slither/core/declarations/function.py

@ -305,6 +305,7 @@ class Function(metaclass=ABCMeta): # pylint: disable=too-many-public-methods
from slither.slithir.operations import Call from slither.slithir.operations import Call
if self._can_send_eth is None: if self._can_send_eth is None:
self._can_send_eth = False
for ir in self.all_slithir_operations(): for ir in self.all_slithir_operations():
if isinstance(ir, Call) and ir.can_send_eth(): if isinstance(ir, Call) and ir.can_send_eth():
self._can_send_eth = True self._can_send_eth = True

Loading…
Cancel
Save