pull/1188/head
Josselin Feist 2 years ago
parent 8509db796e
commit 792321f531
  1. 4
      slither/solc_parsing/expressions/find_variable.py
  2. 4
      slither/solc_parsing/yul/parse_yul.py

@ -98,7 +98,7 @@ def _find_variable_in_function_parser(
return None return None
def _find_top_level( def find_top_level(
var_name: str, scope: "FileScope" var_name: str, scope: "FileScope"
) -> Tuple[ ) -> Tuple[
Optional[Union[Enum, Structure, SolidityImportPlaceHolder, CustomError, TopLevelVariable]], bool Optional[Union[Enum, Structure, SolidityImportPlaceHolder, CustomError, TopLevelVariable]], bool
@ -402,7 +402,7 @@ def find_variable(
return SolidityFunction(var_name), False return SolidityFunction(var_name), False
# Top level must be at the end, if nothing else was found # Top level must be at the end, if nothing else was found
ret, var_was_created = _find_top_level(var_name, current_scope) ret, var_was_created = find_top_level(var_name, current_scope)
if ret: if ret:
return ret, var_was_created return ret, var_was_created

@ -35,7 +35,7 @@ from slither.solc_parsing.yul.evm_functions import (
unary_ops, unary_ops,
binary_ops, binary_ops,
) )
from slither.solc_parsing.expressions.find_variable import _find_top_level from slither.solc_parsing.expressions.find_variable import find_top_level
from slither.visitors.expression.find_calls import FindCalls from slither.visitors.expression.find_calls import FindCalls
from slither.visitors.expression.read_var import ReadVar from slither.visitors.expression.read_var import ReadVar
from slither.visitors.expression.write_var import WriteVar from slither.visitors.expression.write_var import WriteVar
@ -798,7 +798,7 @@ def parse_yul_identifier(root: YulScope, _node: YulNode, ast: Dict) -> Optional[
if magic_suffix: if magic_suffix:
return magic_suffix return magic_suffix
ret, _ = _find_top_level(name, root.contract.file_scope) ret, _ = find_top_level(name, root.contract.file_scope)
if ret: if ret:
return Identifier(ret) return Identifier(ret)

Loading…
Cancel
Save