Merge branch 'dev' into dev-late-subdenomination-conversion

pull/305/head
Josselin 5 years ago
commit 6dfa82fe33
  1. 2
      slither/core/declarations/function.py
  2. 2
      slither/core/slither_core.py

@ -143,7 +143,7 @@ class Function(ChildContract, ChildInheritance, SourceMapping):
""" """
str: function name str: function name
""" """
if self._function_type == FunctionType.CONSTRUCTOR: if self._name == '' and self._function_type == FunctionType.CONSTRUCTOR:
return 'constructor' return 'constructor'
elif self._function_type == FunctionType.FALLBACK: elif self._function_type == FunctionType.FALLBACK:
return 'fallback' return 'fallback'

@ -61,7 +61,7 @@ class Slither(Context):
:param path: :param path:
:return: :return:
""" """
if path in self.crytic_compile.src_content: if self.crytic_compile and path in self.crytic_compile.src_content:
self.source_code[path] = self.crytic_compile.src_content[path] self.source_code[path] = self.crytic_compile.src_content[path]
else: else:
with open(path, encoding='utf8', newline='') as f: with open(path, encoding='utf8', newline='') as f:

Loading…
Cancel
Save