Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[release/v7.4] Fix PSMethodInvocationConstraints.GetHashCode method (#24965)#26953

Merged
jshigetomi merged 1 commit into
PowerShell:release/v7.4PowerShell/PowerShell:release/v7.4from
jshigetomi:backport24965jshigetomi/PowerShell:backport24965Copy head branch name to clipboard
Mar 9, 2026
Merged

[release/v7.4] Fix PSMethodInvocationConstraints.GetHashCode method (#24965)#26953
jshigetomi merged 1 commit into
PowerShell:release/v7.4PowerShell/PowerShell:release/v7.4from
jshigetomi:backport24965jshigetomi/PowerShell:backport24965Copy head branch name to clipboard

Conversation

@jshigetomi

@jshigetomi jshigetomi commented Mar 9, 2026

Copy link
Copy Markdown
Collaborator

Backport of #24965 to release/v7.4

Triggered by @jshigetomi

Original CL Label: CL-General

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

There is a difference between GetHashCode for array object itself and cumulative GetHashCode based on hashes of the array members.
@jshigetomi jshigetomi added CL-Engine Indicates that a PR should be marked as an engine change in the Change Log CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log and removed CL-Engine Indicates that a PR should be marked as an engine change in the Change Log labels Mar 9, 2026
@jshigetomi jshigetomi marked this pull request as ready for review March 9, 2026 18:31
Copilot AI review requested due to automatic review settings March 9, 2026 18:31

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

Backport to release/v7.4 of the fix for PSMethodInvocationConstraints.GetHashCode() so that hash codes are computed from the contents of the parameter/generic-argument arrays rather than the array object identities, aligning with the existing SequenceEqual-based Equals implementation.

Changes:

  • Update PSMethodInvocationConstraints.GetHashCode() to use SequenceGetHashCode() for ParameterTypes and GenericTypeParameters.

@jshigetomi jshigetomi merged commit cf4a2ee into PowerShell:release/v7.4 Mar 9, 2026
39 of 46 checks passed
jshigetomi added a commit to jshigetomi/PowerShell that referenced this pull request Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.