Skip to content

Align ClrType XML documentation with nullability contract - #39088

Merged
AndriySvyryd merged 2 commits into
mainfrom
copilot/fix-clarify-clrtype-documentation
Oct 1, 2026
Merged

AndriySvyryd merged 2 commits into
mainfrom
copilot/fix-clarify-clrtype-documentation

Conversation

Copilot AI commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

IReadOnlyTypeBase.ClrType is non-nullable, but its XML documentation stated that shadow types could return null, producing contradictory guidance for consumers and static analysis.

  • Documentation
    • Remove the obsolete nullable/shadow-type remarks from ClrType.
    • Preserve the non-nullable Type contract reflected by implementations and default interface members.
/// <summary>
///     Gets the CLR class that is used to represent instances of this type.
/// </summary>
Type ClrType { get; }

Copilot AI changed the title [WIP] Fix inconsistency between ClrType documentation and NRT annotation Align ClrType XML documentation with nullability contract Sep 24, 2026
Copilot AI requested a review from AndriySvyryd September 24, 2026 21:27
@AndriySvyryd
AndriySvyryd marked this pull request as ready for review September 24, 2026 22:10
@AndriySvyryd
AndriySvyryd requested a review from a team as a code owner September 24, 2026 22:10
Copilot AI lite review requested due to automatic review settings September 24, 2026 22:10

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.

Copilot review overview

🟢 Approval recommended

Documentation-only change with no unresolved issues.

Review effort: Lite
Findings: None

What changed in this PR

Updates IReadOnlyTypeBase.ClrType XML documentation to match its non-nullable contract.

Changes:

  • Removes obsolete shadow-type nullability remarks.
  • Preserves the existing non-nullable API signature.
File Description
src/​EFCore/​Metadata/​IReadOnlyTypeBase.cs Aligns ClrType documentation with its API contract.

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

@AndriySvyryd
AndriySvyryd enabled auto-merge (squash) September 24, 2026 23:43
@AndriySvyryd
AndriySvyryd merged commit df71b01 into main Oct 1, 2026
23 of 26 checks passed
@AndriySvyryd
AndriySvyryd deleted the copilot/fix-clarify-clrtype-documentation branch October 1, 2026 13:50
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 2, 2026
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.

Contradiction between IReadOnlyTypeBase.ClrType XML documentation and NRT annotation

4 participants