Skip to content

fix(csharp): compile record fields named Equals, GetHashCode, and ToString - #133

Merged
nth-bailey merged 1 commit into
mainfrom
fix/csharp-record-equality-members
Oct 3, 2026
Merged

nth-bailey merged 1 commit into
mainfrom
fix/csharp-record-equality-members

Conversation

@nth-bailey

Copy link
Copy Markdown
Collaborator

UCI's QueryPET has an Equals field, which becomes an invalid positional C# record member and fails with CS8866. Generated properties named Equals, GetHashCode, or ToString now receive a Value suffix before normal collision handling; XML names remain unchanged.

A generated-runtime regression checks all three names plus an explicit EqualsValue collision in both record and mutable-class models. The full UCI C# output now compiles under the 3500 MiB cgroup budget.

Validation: Rust format, strict workspace Clippy, codegen/schema/CLI tests, seven-language smoke, Python lint/format, and 112 Python tests with 100% statement/branch coverage passed. C# runtime tests used .NET 10 roll-forward; the corpus build targeted net8.0. Companion W3C CType: 31/31 schema compilations, 23/28 Python instance checks (five unresolved instance failures).

Part of polyxml/polyxml-schema-corpus#1. Rust UCI compilation still exceeds the 3500 MiB gate budget, so that issue is not resolved by this change alone.

@nth-bailey
nth-bailey marked this pull request as ready for review October 3, 2026 07:30
@nth-bailey
nth-bailey merged commit 252af4a into main Oct 3, 2026
30 checks passed
@nth-bailey
nth-bailey deleted the fix/csharp-record-equality-members branch October 3, 2026 07:30
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