Fix HashSet.SetCapacity() that increases capacity failing after a successful Remove...
authorCory Nelson <phrosty@gmail.com>
Wed, 28 Aug 2019 20:11:02 +0000 (13:11 -0700)
committerGitHub <noreply@github.com>
Wed, 28 Aug 2019 20:11:02 +0000 (13:11 -0700)
commit9255ae5539e82fe3f90f77bcb1ac5bf3c803c776
treeb200c10b541ddcbdb9407c1ae20797244463c849
parentf510de96beccb59b5e1f1bd1b33289d50654a38d
Fix HashSet.SetCapacity() that increases capacity failing after a successful Remove(). (dotnet/corefx#40638)

Fix HashSet.SetCapacity() not accounting for freelist when increasing capacity.

Resolves dotnet/corefx#40621

Commit migrated from https://github.com/dotnet/corefx/commit/2d6fe6b5cc3adba461bb8737c7e5c947992d4c7a
src/libraries/System.Collections/src/System/Collections/Generic/HashSet.cs
src/libraries/System.Collections/tests/Generic/HashSet/HashSet.Generic.Tests.netcoreapp.cs