diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/Lightup/IImportScopeWrapperCSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/Lightup/IImportScopeWrapperCSharp11UnitTests.cs index 741fbf8e7..68ae4de6e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/Lightup/IImportScopeWrapperCSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/Lightup/IImportScopeWrapperCSharp11UnitTests.cs @@ -1,9 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -// Tests calls where nullability rules are not obeyed -#pragma warning disable CS8604 // Possible null reference argument. - namespace StyleCop.Analyzers.Test.Lightup { using System; @@ -18,8 +15,8 @@ public class IImportScopeWrapperCSharp11UnitTests public void TestNull() { object? obj = null; - Assert.False(IImportScopeWrapper.IsInstance(obj)); - var wrapper = IImportScopeWrapper.FromObject(obj); + Assert.False(IImportScopeWrapper.IsInstance(obj!)); + var wrapper = IImportScopeWrapper.FromObject(obj!); Assert.Throws(() => wrapper.Aliases); }