Merge pull request #846 from crytic/dev-value-get

Fix minor dict access issues
pull/848/head
Feist Josselin 4 years ago committed by GitHub
commit 3e1622706b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      slither/solc_parsing/expressions/expression_parsing.py

@ -729,7 +729,7 @@ def parse_expression(expression: Dict, caller_context: CallerContext) -> "Expres
assert "children" not in expression
if is_compact_ast:
value = expression["value"]
value = expression.get("value", None)
if value:
if "subdenomination" in expression and expression["subdenomination"]:
subdenomination = expression["subdenomination"]
@ -742,7 +742,7 @@ def parse_expression(expression: Dict, caller_context: CallerContext) -> "Expres
if expression["kind"] == "number":
type_candidate = "int_const"
else:
value = expression["attributes"]["value"]
value = expression["attributes"].get("value", None)
if value:
if (
"subdenomination" in expression["attributes"]

Loading…
Cancel
Save