Skip to content

fix: exclude localparams from parameter overrides#218

Draft
hongjr03 wants to merge 1 commit into
masterfrom
fix/parameter-localparam-overrides
Draft

fix: exclude localparams from parameter overrides#218
hongjr03 wants to merge 1 commit into
masterfrom
fix/parameter-localparam-overrides

Conversation

@hongjr03
Copy link
Copy Markdown
Member

@hongjr03 hongjr03 commented Jun 2, 2026

Summary

This change models parameter declarations in HIR as either parameter or localparam, including keyword inheritance in module parameter port lists.

Code actions and completion now use the HIR overridability model instead of treating all parameter declarations as instance-override candidates. This prevents Fill parameters from adding module-local localparam entries such as memory operation constants.

Validation

  • cargo fmt --check
  • cargo test -p ide code_action::tests
  • cargo test -p ide completion::engine
  • cargo test code_action_request_

@hongjr03 hongjr03 marked this pull request as ready for review June 2, 2026 14:14
@hongjr03 hongjr03 requested a review from roife June 2, 2026 14:14
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Docs preview: https://vide.pascal-lab.net/preview/pr-218/

@hongjr03 hongjr03 marked this pull request as draft June 4, 2026 05:37
@hongjr03
Copy link
Copy Markdown
Member Author

hongjr03 commented Jun 4, 2026

Keeping this in draft while I revisit the parameter classification.

The current HIR model handles explicit localparam declarations and keyword inheritance inside the parameter port list, but it still needs to mirror the SystemVerilog/slang rule that when a module has a parameter port list, directly contained body parameter declarations are implicitly local and cannot be overridden by instance parameter assignments.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant