Repository navigation
[core] Reject domain association with subfields of wires - #5548
Merged
jackkoenig merged 2 commits intoNov 13, 2026
Merged
Conversation
Module.associate used topBindingOpt to detect wires, which resolves a child of a wire to the wire's binding. A subfield of a wire was therefore accepted and the association silently dropped on emission. Check the direct binding instead so subfields hit the existing "not a port or wire" error, matching what already happens for port subfields. Fixes chipsalliance#5507 Assisted-by: Claude Code:claude-sonnet-5-5
jackkoenig
reviewed
Nov 13, 2026
jackkoenig
approved these changes
Nov 13, 2026
jackkoenig
enabled auto-merge (squash)
November 13, 2026 21:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Module.associatedecided whether the target was a wire withtopBindingOpt, which resolves a child of a wire to the wire's own binding. So a subfield likewire.clockwas accepted and then silently dropped on emission, since only top-level ports and wires carry associations. Check the direct binding instead, so subfields (bundle fields, Vec elements, nested fields) get the existing "not a port or wire in this module" error, the same as port subfields already do.Adds tests for the rejected subfield case and for associating a whole aggregate wire. DomainSpec passes on Scala 2.13 and 3.
Fixes #5507.
Release Notes
Associating a domain with a subfield of a wire is now an elaboration error instead of being silently ignored.
Development notes