Skip to content

Commit 14fb6f2

Browse files
authored
Fix PSMethodInvocationConstraints.GetHashCode method (PowerShell#24965)
There is a difference between GetHashCode for array object itself and cumulative GetHashCode based on hashes of the array members.
1 parent 6d6515b commit 14fb6f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/System.Management.Automation/engine/MshMemberInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2009,7 +2009,7 @@ public override bool Equals(object obj)
20092009
}
20102010

20112011
public override int GetHashCode()
2012-
=> HashCode.Combine(MethodTargetType, ParameterTypes, GenericTypeParameters);
2012+
=> HashCode.Combine(MethodTargetType, ParameterTypes.SequenceGetHashCode(), GenericTypeParameters.SequenceGetHashCode());
20132013

20142014
public override string ToString()
20152015
{

0 commit comments

Comments
 (0)