diff --git a/src/nunit.analyzers.tests/DiagnosticSuppressors/DereferencePossiblyNullReferenceSuppressorTests.cs b/src/nunit.analyzers.tests/DiagnosticSuppressors/DereferencePossiblyNullReferenceSuppressorTests.cs index 2d62618a..a894a85b 100644 --- a/src/nunit.analyzers.tests/DiagnosticSuppressors/DereferencePossiblyNullReferenceSuppressorTests.cs +++ b/src/nunit.analyzers.tests/DiagnosticSuppressors/DereferencePossiblyNullReferenceSuppressorTests.cs @@ -1017,7 +1017,15 @@ private static string GetStringSuppress(HasString? str) // argument is nullable return str.Inner; // warning: possible null reference return } - private record HasString(string? Inner); + private sealed class HasString + { + public HasString(string? inner) + { + Inner = inner; + } + + public string? Inner { get; } + } "); RoslynAssert.Suppressed(suppressor,