From 94d437baae675ad4ee92a6f16c264a765e30a01f Mon Sep 17 00:00:00 2001 From: Josselin Date: Mon, 30 Mar 2020 09:48:14 +0200 Subject: [PATCH] Fix parsing of abi.decode(.., (type)) --- slither/solc_parsing/expressions/expression_parsing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/slither/solc_parsing/expressions/expression_parsing.py b/slither/solc_parsing/expressions/expression_parsing.py index a3d48c7f2..8c8be68a0 100644 --- a/slither/solc_parsing/expressions/expression_parsing.py +++ b/slither/solc_parsing/expressions/expression_parsing.py @@ -312,8 +312,10 @@ def _parse_elementary_type_name_expression(expression, is_compact_ast, caller_co else: assert 'children' not in expression value = expression['attributes']['value'] - t = parse_type(UnknownType(value), caller_context) - + if isinstance(value, dict): + t = parse_type(value, caller_context) + else: + t = parse_type(UnknownType(value), caller_context) e = ElementaryTypeNameExpression(t) e.set_offset(expression['src'], caller_context.slither) return e