Skip to content

Conversation

MichalStrehovsky
Copy link
Member

We have defined behaviors for this. We have tests that test the defined behaviors. I guess I'm the first person to run those tests with a Debug version of CoreLib and hit the assert. (Libraries testing typically uses Release runtime but the only time I build Release runtime is for perf testing.)

We have defined behaviors for this. We have tests that test the defined behaviors. I guess I'm the first person to run those tests with a Debug version of CoreLib and hit the assert. (Libraries testing typically uses Release runtime but the only time I build Release runtime is for perf testing.)
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Removes a debug-only assertion in the DefaultValueAttribute constructor so that runtime instantiation behaves as defined by existing tests even in Debug builds.

  • Eliminates Debug.Assert(IsSupported, ...) to avoid test failures in Debug CoreLib builds.
  • Retains the existing fallback path when IsSupported is false.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-componentmodel
See info in area-owners.md if you want to be subscribed.

@stephentoub stephentoub merged commit 505ce88 into main Jun 26, 2025
135 of 145 checks passed
@stephentoub stephentoub deleted the MichalStrehovsky-patch-1 branch June 26, 2025 13:10
@github-actions github-actions bot locked and limited conversation to collaborators Jul 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants