diff --git a/decompiler/structures/pseudo/operations.py b/decompiler/structures/pseudo/operations.py index 1b8c88d89..95045067c 100644 --- a/decompiler/structures/pseudo/operations.py +++ b/decompiler/structures/pseudo/operations.py @@ -10,7 +10,7 @@ from decompiler.util.insertion_ordered_set import InsertionOrderedSet -from .expressions import Constant, Expression, FunctionSymbol, ImportedFunctionSymbol, IntrinsicSymbol, Symbol, Tag, Variable +from .expressions import Constant, Expression, IntrinsicSymbol, Symbol, Tag, Variable from .typing import CustomType, Pointer, Type, UnknownType T = TypeVar("T") @@ -470,7 +470,7 @@ class Call(Operation): def __init__( self, - function: Union[FunctionSymbol, ImportedFunctionSymbol, IntrinsicSymbol, Variable], + function: Expression, parameter: List[Expression], vartype: Type = UnknownType(), writes_memory: Optional[int] = None, @@ -522,7 +522,7 @@ def requirements_iter(self) -> Iterator[Variable]: yield from super().requirements_iter @property - def function(self) -> Union[FunctionSymbol, ImportedFunctionSymbol, IntrinsicSymbol, Variable]: + def function(self) -> Expression: """Return the name of the function called.""" return self._function diff --git a/decompiler/structures/visitors/substitute_visitor.py b/decompiler/structures/visitors/substitute_visitor.py index 4e3928dc4..1cd71fec5 100644 --- a/decompiler/structures/visitors/substitute_visitor.py +++ b/decompiler/structures/visitors/substitute_visitor.py @@ -11,10 +11,7 @@ Continue, DataflowObject, Expression, - FunctionSymbol, GenericBranch, - ImportedFunctionSymbol, - IntrinsicSymbol, ListOperation, MemPhi, Operation, @@ -152,7 +149,7 @@ def visit_binary_operation(self, op: BinaryOperation) -> Optional[DataflowObject def visit_call(self, op: Call) -> Optional[DataflowObject]: if (function_replacement := op.function.accept(self)) is not None: - op._function = _assert_type(function_replacement, Union[FunctionSymbol, ImportedFunctionSymbol, IntrinsicSymbol, Variable]) + op._function = _assert_type(function_replacement, Expression) return self._visit_operation(op)