Skip to content

Commit

Permalink
allow converting library to address
Browse files Browse the repository at this point in the history
  • Loading branch information
samczsun committed Jul 29, 2020
1 parent be28138 commit 7f438db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion slither/slithir/operations/type_conversion.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from slither.core.declarations import Contract
from slither.core.solidity_types.type import Type
from slither.slithir.operations.lvalue import OperationWithLValue
from slither.slithir.utils.utils import is_valid_lvalue, is_valid_rvalue
Expand All @@ -7,7 +8,7 @@ class TypeConversion(OperationWithLValue):

def __init__(self, result, variable, variable_type):
super().__init__()
assert is_valid_rvalue(variable)
assert is_valid_rvalue(variable) or isinstance(variable, Contract)
assert is_valid_lvalue(result)
assert isinstance(variable_type, Type)

Expand Down

0 comments on commit 7f438db

Please sign in to comment.