Skip to content

Critical: Parameter names leak into global action_parameters set #198

Description

@coderabbitai

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions