Skip to content

Fix 67285 parameter view cast message - #67452

Closed
dx3mirror wants to merge 4 commits into
dotnet:mainfrom
dx3mirror:fix-67285-parameter-view-cast-message
Closed

dx3mirror wants to merge 4 commits into
dotnet:mainfrom
dx3mirror:fix-67285-parameter-view-cast-message

Conversation

@dx3mirror

@dx3mirror dx3mirror commented Jun 29, 2026 •

Copy link
Copy Markdown

Summary

  • Improves InvalidCastException message in ParameterView.TryGetValue to include parameter name and source/target types
  • Adds test coverage for splat dictionary scenario (int → double)

Fixes #67285

Test plan

  • ParameterViewTest.ThrowsIfTryGetExistingValueWithIncorrectType passes
  • ParameterViewTest.FromDictionary_ThrowsIfTryGetValueWithIncorrectType passes

@dx3mirror
dx3mirror requested a review from a team as a code owner June 29, 2026 05:44
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Jun 29, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Thanks for your PR, @dx3mirror. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dx3mirror

Copy link
Copy Markdown
Author

@dotnet-policy-service agree

@BrennanConroy BrennanConroy added the area-blazor Includes: Blazor, Razor Components label Jun 30, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@dotnet-policy-service dotnet-policy-service Bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Sep 26, 2026
@kotlarmilos

Copy link
Copy Markdown
Member

Thanks for the contribution. The default parameter-setting path already reports the parameter name, and TryGetValue is called by user code that knows which parameter it requested. The diagnostic improvement does not seem necessary for the framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components community-contribution Indicates that the PR has been added by a community member pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ParameterView unchecked type casts when splatting provides unhelpful error messages

3 participants