Skip to content

Delete dead code in MEV - #67214

Merged
Youssef1313 merged 5 commits into
mainfrom
dev/ygerges/deadcode
Jun 16, 2026
Merged

Youssef1313 merged 5 commits into
mainfrom
dev/ygerges/deadcode

Conversation

@Youssef1313

Copy link
Copy Markdown
Member

Fixes #67211

Copilot AI review requested due to automatic review settings June 15, 2026 13:08

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.

Pull request overview

This PR aims to remove dead/unreachable nullability-related code in the Microsoft.Extensions.Validation (MEV) area, addressing the issue that TypeExtensions.IsNullable was effectively non-functional.

Changes:

  • Removes the unused/dead TypeExtensions.IsNullable(Type) helper.
  • Changes ValidatableParameterInfo.ValidateAsync to treat value == null as unreachable (currently implemented by throwing UnreachableException).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/Validation/src/ValidatableParameterInfo.cs Alters null-handling behavior in parameter validation (currently throws on null).
src/Validation/src/TypeExtensions.cs Deletes dead IsNullable helper method.

@Youssef1313
Youssef1313 merged commit ad2f14f into main Jun 16, 2026
25 checks passed
@Youssef1313
Youssef1313 deleted the dev/ygerges/deadcode branch June 16, 2026 07:16
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone Jun 23, 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.

Microsoft.Extensions.Validation: IsNullable implementation is always false

3 participants