From 5ce67b751b1ba70d138877a789d626c1625b6750 Mon Sep 17 00:00:00 2001 From: Simone Date: Fri, 17 Jan 2025 12:59:25 +0100 Subject: [PATCH] Fix analysis for named return variables --- slither/analyses/write/are_variables_written.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither/analyses/write/are_variables_written.py b/slither/analyses/write/are_variables_written.py index 2f8f83063d..2524897d27 100644 --- a/slither/analyses/write/are_variables_written.py +++ b/slither/analyses/write/are_variables_written.py @@ -86,7 +86,7 @@ def _visit( lvalue = refs_lvalues ret: List[Variable] = [] - if not node.sons and node.type not in [NodeType.THROW, NodeType.RETURN]: + if not node.sons and node.type is not NodeType.THROW: ret += [v for v in variables_to_write if v not in variables_written] # Explore sons if