Skip to content

Commit d7724dd

Browse files
committed
Fix nullability warnings in CopyOnWritePropertyDictionary_Tests
1 parent 1d7f189 commit d7724dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Build.UnitTests/Collections/CopyOnWritePropertyDictionary_Tests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void Indexer()
6161
dic["b"].ShouldBeSameAs(b);
6262

6363
// Cannot set a null value
64-
Assert.ThrowsAny<Exception>(() => dic["a"] = null);
64+
Assert.ThrowsAny<Exception>(() => dic["a"] = null!);
6565

6666
// Value's key must match the specified key
6767
Assert.ThrowsAny<Exception>(() => dic["a"] = b);
@@ -206,7 +206,7 @@ private sealed class MockValue : IKeyed, IValued, IEquatable<MockValue>, IImmuta
206206

207207
public string EscapedValue => Key;
208208

209-
public bool Equals(MockValue other)
209+
public bool Equals(MockValue? other)
210210
{
211211
return other != null && Key == other.Key;
212212
}

0 commit comments

Comments
 (0)