From d42f3981e5e46d8d8d474e815ce6c0f6b8f9ed96 Mon Sep 17 00:00:00 2001 From: samczsun Date: Wed, 29 Jul 2020 13:43:17 -0400 Subject: [PATCH] allow converting library to address --- slither/slithir/operations/type_conversion.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slither/slithir/operations/type_conversion.py b/slither/slithir/operations/type_conversion.py index 13b053b04..d80802054 100644 --- a/slither/slithir/operations/type_conversion.py +++ b/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.slithir.operations.lvalue import OperationWithLValue 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): 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)