Skip to content

Document open generic derived type support - #1073

Merged
AArnott merged 1 commit into
mainfrom
eiriktsarpalis-open-generic-union-docs
Sep 17, 2026
Merged

AArnott merged 1 commit into
mainfrom
eiriktsarpalis-open-generic-union-docs

Conversation

@eiriktsarpalis

Copy link
Copy Markdown
Collaborator

The polymorphic serialization docs still say generic derived types must be closed, although PolyType 1.4.1 supports open generic registrations.

Corrects that restriction and adds a simple Base<T> / Derived<T> example adapted from eiriktsarpalis/PolyType#446. The original closed-generic example is unchanged.

Keep the closed-generic example and add a simple open-generic union example for PolyType 1.4.1.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 17, 2026 17:38

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 unresolved review issues remain.

Pull request overview

Updates polymorphic serialization documentation and samples to demonstrate open generic derived type support in PolyType 1.4.1.

Changes:

  • Adds a Base<T>/Derived<T> open-generic sample.
  • Documents type-argument inference and registration behavior.
File summaries
File Description
samples/cs/Unions.cs Adds the open-generic union example.
docfx/docs/unions.md Documents open generic derived type support.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.68%. Comparing base (9e04d02) to head (0067161).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1073   +/-   ##
=======================================
  Coverage   76.68%   76.68%           
=======================================
  Files         175      175           
  Lines       13477    13477           
  Branches     2727     2727           
=======================================
  Hits        10335    10335           
  Misses       2261     2261           
  Partials      881      881           
Flag Coverage Δ
Linux 75.60% <ø> (+0.03%) ⬆️
Windows 76.23% <ø> (+0.02%) ⬆️
macOS 75.47% <ø> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AArnott
AArnott merged commit 6090149 into main Sep 17, 2026
10 checks passed
@AArnott
AArnott deleted the eiriktsarpalis-open-generic-union-docs branch September 17, 2026 20:25
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.

3 participants