Merge pull request #561 from crytic/bugfix/library-address

Allow converting library to address
pull/562/head
Feist Josselin 4 years ago committed by GitHub
commit ef38fc4ac8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      slither/slithir/operations/type_conversion.py

@ -1,3 +1,4 @@
from slither.core.declarations import Contract
from slither.core.solidity_types.type import Type from slither.core.solidity_types.type import Type
from slither.slithir.operations.lvalue import OperationWithLValue from slither.slithir.operations.lvalue import OperationWithLValue
from slither.slithir.utils.utils import is_valid_lvalue, is_valid_rvalue from slither.slithir.utils.utils import is_valid_lvalue, is_valid_rvalue
@ -7,7 +8,7 @@ class TypeConversion(OperationWithLValue):
def __init__(self, result, variable, variable_type): def __init__(self, result, variable, variable_type):
super().__init__() super().__init__()
assert is_valid_rvalue(variable) assert is_valid_rvalue(variable) or isinstance(variable, Contract)
assert is_valid_lvalue(result) assert is_valid_lvalue(result)
assert isinstance(variable_type, Type) assert isinstance(variable_type, Type)

Loading…
Cancel
Save