mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix PSMethodInvocationConstraints.GetHashCode method (#24965)
There is a difference between GetHashCode for array object itself and cumulative GetHashCode based on hashes of the array members.
This commit is contained in:
@@ -2009,7 +2009,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
=> HashCode.Combine(MethodTargetType, ParameterTypes, GenericTypeParameters);
|
||||
=> HashCode.Combine(MethodTargetType, ParameterTypes.SequenceGetHashCode(), GenericTypeParameters.SequenceGetHashCode());
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user