Skip to content

Unified: Populate external_name_node for enum case parameters - #23096

Merged
hvitved merged 1 commit into
github:mainfrom
hvitved:unified/enum-case-external-name
Nov 11, 2026
Merged

hvitved merged 1 commit into
github:mainfrom
hvitved:unified/enum-case-external-name

Conversation

@hvitved

@hvitved hvitved commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the update to preserve Swift enum case parameter labels.

No open issues 🎉

What changed in this PR

This PR updates the unified Swift extractor to populate external_name_node for enum case parameters, preserving their labels in the extracted representation.

Changes:

  • Add external_name_node alongside the existing parameter pattern and type.
  • Update expected corpus output to include the radius and side labels.
File Description
unified/​extractor/​tests/​corpus/​swift/​types/​enum-with-associated-values.output Update expected output for labeled enum case parameters.
unified/​extractor/​src/​languages/​swift/​swift.rs Populate external-name nodes when translating enum case parameters.

Review effort: Balanced (auto)

@hvitved
hvitved marked this pull request as ready for review November 11, 2026 11:30
@hvitved
hvitved requested a review from a team as a code owner November 11, 2026 11:30

@asgerf asgerf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. There is the caveat that the argument label is optional when calling an enum constructor but this is probably still the most sensible thing to extract.

@asgerf

asgerf commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Sorry, the argument label is optional in constructor patterns, not at call sites.

@hvitved
hvitved merged commit 74d0183 into github:main Nov 11, 2026
9 checks passed
@hvitved
hvitved deleted the unified/enum-case-external-name branch November 11, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants