function-ids printer: fix incorrect type in case of multi-dim arrays

pull/211/head
Josselin 6 years ago
parent d9d960fa9c
commit e66db801a2
  1. 7
      slither/printers/summary/function_ids.py

@ -34,7 +34,12 @@ class FunctionIds(AbstractPrinter):
if variable.visibility in ['public']: if variable.visibility in ['public']:
variable_getter_args = "" variable_getter_args = ""
if type(variable.type) is ArrayType: if type(variable.type) is ArrayType:
variable_getter_args = "uint256" length = 0
v = variable
while type(v.type) is ArrayType:
length += 1
v = v.type
variable_getter_args = ','.join(["uint256"]*length)
elif type(variable.type) is MappingType: elif type(variable.type) is MappingType:
variable_getter_args = variable.type.type_from variable_getter_args = variable.type.type_from

Loading…
Cancel
Save