From e600169ed2fcf4173176ff3c47cbba1e055e9a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Hellander?= Date: Wed, 20 Dec 2023 16:53:12 +0100 Subject: [PATCH] Fix review comments #3594 --- .../Lightup/IImportScopeWrapperCSharp11UnitTests.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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); }