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
"""
if self._function_type == FunctionType.CONSTRUCTOR:
if self._name == '' and self._function_type == FunctionType.CONSTRUCTOR:
return 'constructor'
elif self._function_type == FunctionType.FALLBACK:
return 'fallback'

@ -61,7 +61,7 @@ class Slither(Context):
:param path:
: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]
else:
with open(path, encoding='utf8', newline='') as f:

Loading…
Cancel
Save