C#: Add neutral model for System.ComponentModel.PropertyDescriptor.GetValue#20627
Merged
aschackmull merged 1 commit intogithub:mainfrom Oct 14, 2025
Merged
Conversation
49f2c4d to
2577452
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR disables the automatically generated flow summary for System.ComponentModel.PropertyDescriptor.GetValue by adding a neutral model. The change prevents potential type safety issues where the method's object -> object signature could lead to incorrect upcasting and downcasting of known specific types to incompatible property types.
- Adds a manual neutral model for
PropertyDescriptor.GetValueto override the auto-generated flow summary - Removes the problematic
dfc-generatedflow summaries from test expectations for bothSystem.ComponentModel.PropertyDescriptorandNewtonsoft.Json.Linq.JPropertyDescriptor
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| System.ComponentModel.model.yml | Adds neutral model configuration to disable flow summary for PropertyDescriptor.GetValue |
| FlowSummaries.expected | Updates test expectations by removing auto-generated summaries and adding neutral model entries |
| FlowSummariesFiltered.expected | Removes the filtered flow summary entry for PropertyDescriptor.GetValue |
Contributor
|
Dca shows zero impact. Merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR disables the flow-generated summary for
PropertyDescriptor.GetValue. The problem with this summary is that it has typeobject -> object, which means that we risk first upcasting a known specific typettoobject, and then subsequently downcasting it to a different type, which does not correspond to the type of any property oft.