Skip to content

Preserve explicit class constructor ABI in cs2gs - #2760

Merged
DavidObando merged 2 commits into
mainfrom
fix/2746-cs2gs-abi
Jul 22, 2026
Merged

Preserve explicit class constructor ABI in cs2gs#2760
DavidObando merged 2 commits into
mainfrom
fix/2746-cs2gs-abi

Conversation

@DavidObando

@DavidObando DavidObando commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • stop all explicit class constructor lifting at the shared AnalyzeConstructorLift root
  • preserve original constructor parameter names, private field visibility, and property getters through the normal constructor/member translators
  • cover Oahu OutputContext/CapabilityPolicy and a field-backed class through translation, gsc compilation, and a real C# named-argument/property/reflection consumer
  • keep native C# primary constructors covered as the negative case

Scope and issue mapping

No ABI case discovered in this audit is left untracked.

Validation

  • targeted generalized ABI/regression tests: 9 passed
  • MSBUILDDISABLENODEREUSE=1 dotnet test tools/cs2gs/Cs2Gs.Tests/Cs2Gs.Tests.csproj -c Release --no-build --no-restore --nologo: 1,728 passed on latest main

Fixes #2746

@DavidObando DavidObando changed the title Preserve explicit constructor property ABI in cs2gs Preserve explicit class constructor ABI in cs2gs Jul 22, 2026
@DavidObando
DavidObando merged commit ac13b53 into main Jul 22, 2026
10 checks passed
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.

cs2gs: primary-constructor reshaping breaks constructor and property ABI

1 participant