expression_parsing: parse member type instead of leaving as raw str

pull/730/head
Maximilian Krueger 4 years ago
parent 9823336445
commit 17ef07f503
  1. 4
      slither/solc_parsing/expressions/expression_parsing.py

@ -674,11 +674,11 @@ def parse_expression(expression: Dict, caller_context: CallerContext) -> "Expres
if name == "MemberAccess": if name == "MemberAccess":
if caller_context.is_compact_ast: if caller_context.is_compact_ast:
member_name = expression["memberName"] member_name = expression["memberName"]
member_type = expression["typeDescriptions"]["typeString"] member_type = parse_type(UnknownType(expression["typeDescriptions"]["typeString"]), caller_context)
member_expression = parse_expression(expression["expression"], caller_context) member_expression = parse_expression(expression["expression"], caller_context)
else: else:
member_name = expression["attributes"]["member_name"] member_name = expression["attributes"]["member_name"]
member_type = expression["attributes"]["type"] member_type = parse_type(UnknownType(expression["attributes"]["type"]), caller_context)
children = expression["children"] children = expression["children"]
assert len(children) == 1 assert len(children) == 1
member_expression = parse_expression(children[0], caller_context) member_expression = parse_expression(children[0], caller_context)

Loading…
Cancel
Save