We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef211dd commit 3e8504cCopy full SHA for 3e8504c
BitFaster.Caching.UnitTests/ReferenceCountTests.cs
@@ -58,5 +58,15 @@ public void WhenObjectsAreDifferentHashcodesAreDifferent()
58
59
a.GetHashCode().Should().NotBe(b.GetHashCode());
60
}
61
+
62
+ [Fact]
63
+ public void WhenObjectIsNullGetHashCodeDoesntThrow()
64
+ {
65
+ var a = new ReferenceCount<object>(null);
66
67
+ // nullable static analysis suggests this is broken, but it is legal to call
68
+ // EqualityComparer<TValue>.Default.GetHashCode(null)
69
+ a.GetHashCode();
70
+ }
71
72
0 commit comments