Fix UserDefinedTypeName parsing in type_parsing.py to use the 'type' attribute instead of 'name' attribute.

pull/161/head
David Pokora 6 years ago
parent 59af3887a4
commit cd09f6c64e
No known key found for this signature in database
GPG Key ID: 3CED48D1BB21BDD7
  1. 2
      slither/solc_parsing/solidity_types/type_parsing.py

@ -160,7 +160,7 @@ def parse_type(t, caller_context):
elif t[key] == 'UserDefinedTypeName':
if is_compact_ast:
return _find_from_type_name(t['typeDescriptions']['typeString'], contract, contracts, structures, enums)
return _find_from_type_name(t['attributes'][key], contract, contracts, structures, enums)
return _find_from_type_name(t['attributes']['type'], contract, contracts, structures, enums)
elif t[key] == 'ArrayTypeName':
length = None

Loading…
Cancel
Save