Problem Description
In the analyzer's analyze_action_body method (src/analyzer/mod.rs, lines 1388-1427), parameter names are inserted into self.action_parameters before analyzing action bodies but are never removed afterward. This causes parameter names from one action to remain valid when analyzing subsequent code, potentially masking undefined variable errors in other actions or top-level statements.
Affected Code
File: src/analyzer/mod.rs
Lines: 1388-1427 (specifically lines 1399-1401 where parameters are inserted)
Expected Behavior
Parameter names should only be valid within their respective action's scope and should be removed from action_parameters after the action body analysis completes.
References
Problem Description
In the analyzer's
analyze_action_bodymethod (src/analyzer/mod.rs, lines 1388-1427), parameter names are inserted intoself.action_parametersbefore analyzing action bodies but are never removed afterward. This causes parameter names from one action to remain valid when analyzing subsequent code, potentially masking undefined variable errors in other actions or top-level statements.Affected Code
File:
src/analyzer/mod.rsLines: 1388-1427 (specifically lines 1399-1401 where parameters are inserted)
Expected Behavior
Parameter names should only be valid within their respective action's scope and should be removed from
action_parametersafter the action body analysis completes.References