Skip to content

fix: avoid overexpanding extension mapping output (v0.8.2) - #63

Merged
ycherkes merged 2 commits into
mainfrom
fix/extension-expansion-output
Nov 6, 2026
Merged

ycherkes merged 2 commits into
mainfrom
fix/extension-expansion-output

Conversation

@ycherkes

@ycherkes ycherkes commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Expanded C# 14 extension bodies unnecessarily replaced accessible named constants with cast literals and wrapped object creation expressions in parentheses. Preserve constant references when they are accessible from the generated output type, while continuing to inline inaccessible constants, and omit redundant parentheses around explicit object creation. Target-typed creation is normalized to explicit creation before this check; return conversion casts retain their parentheses.

Adds regression coverage for qualified and unqualified constants, public/internal/private accessibility, explicit and target-typed object creation, member access, and adapted extension helpers using a rounding constant. Runtime tests also verify interface return conversions with explicit interface implementation and user-defined implicit conversions, both directly and before member access. Includes the 0.8.2 version bump and corresponding generated-code version snapshots.

Validation:

  • Release solution build and full solution tests passed: 224 succeeded, 0 failed, 0 skipped.
  • git diff --check passed.
  • Before the final condition narrowing and conversion tests, NuGet packing with --no-build --no-restore and compiler/package compatibility checks passed for Roslyn 4.8.0, 4.14.0, 5.0.0, and the installed SDK.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T20:04:22.719799Z 3687d85 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ycherkes
ycherkes merged commit 650526b into main Nov 6, 2026
1 check passed
@ycherkes
ycherkes deleted the fix/extension-expansion-output branch November 6, 2026 20:09
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