Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion slither/slithir/variables/local_variable.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from typing import Set
from slither.core.variables.local_variable import LocalVariable
from slither.core.variables.top_level_variable import TopLevelVariable
from slither.slithir.variables.temporary import TemporaryVariable
from slither.slithir.variables.variable import SlithIRVariable
from slither.slithir.variables.state_variable import StateIRVariable
Expand Down Expand Up @@ -68,7 +69,8 @@ def non_ssa_version(self) -> LocalVariable:
def add_refers_to(self, variable: StateIRVariable) -> None:
# It is a temporaryVariable if its the return of a new ..
# ex: string[] memory dynargs = new string[](1);
assert isinstance(variable, (SlithIRVariable, TemporaryVariable))
# It can also be a TopLevelVariable for file-level constant/immutable references
assert isinstance(variable, (SlithIRVariable, TemporaryVariable, TopLevelVariable))
self._refers_to.add(variable)

@property
Expand Down
Loading