diff --git a/brownie/project/compiler/utils.py b/brownie/project/compiler/utils.py index 7c0627094..c4e7be4e7 100644 --- a/brownie/project/compiler/utils.py +++ b/brownie/project/compiler/utils.py @@ -8,6 +8,12 @@ def expand_source_map(source_map_str: str) -> List: # Expands the compressed sourceMap supplied by solc into a list of lists + + if isinstance(source_map_str, dict): + source_map_str = str(source_map_str) + if not isinstance(source_map_str, str): + raise TypeError(source_map_str) from None + source_map: List = [_expand_row(i) if i else None for i in source_map_str.split(";")] for i, value in enumerate(source_map[1:], 1): if value is None: