Skip to content

Comments

[Issue #14] Add JSON-style conflict resolution for promoted anonymous struct fields#32

Merged
ajg merged 1 commit intomasterfrom
anonymous-fields-without-prefix
Feb 17, 2026
Merged

[Issue #14] Add JSON-style conflict resolution for promoted anonymous struct fields#32
ajg merged 1 commit intomasterfrom
anonymous-fields-without-prefix

Conversation

@ajg
Copy link
Owner

@ajg ajg commented Feb 17, 2026

Replace the inline promote-and-merge loop in encodeStruct with a BFS pre-collection pass (collectFields) that resolves naming conflicts before encoding begins. Shallower depth wins, tagged fields beat untagged at the same depth, and truly ambiguous fields are omitted entirely — matching encoding/json semantics.

Replace the inline promote-and-merge loop in encodeStruct with a BFS
pre-collection pass (collectFields) that resolves naming conflicts before
encoding begins. Shallower depth wins, tagged fields beat untagged at the
same depth, and truly ambiguous fields are omitted entirely — matching
encoding/json semantics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ajg ajg force-pushed the anonymous-fields-without-prefix branch from a2e0a2d to da85fcd Compare February 17, 2026 02:20
@ajg ajg self-assigned this Feb 17, 2026
@ajg ajg merged commit 5944a86 into master Feb 17, 2026
7 checks passed
@ajg ajg deleted the anonymous-fields-without-prefix branch February 17, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant