Improve IsExactInstanceOfType error message for NULL values #7418
+21
−4
Azure Pipelines / microsoft.testfx (Build Linux Debug)
failed
Feb 16, 2026 in 3m 34s
Build Linux Debug failed
Annotations
azure-pipelines / microsoft.testfx (Build Linux Debug)
src/TestFramework/TestFramework/Assertions/Assert.IsExactInstanceOfType.cs#L352
src/TestFramework/TestFramework/Assertions/Assert.IsExactInstanceOfType.cs(352,18): error IDE0045: (NETCORE_ENGINEERING_TELEMETRY=Build) 'if' statement can be simplified (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0045)
azure-pipelines / microsoft.testfx (Build Linux Debug)
src/TestFramework/TestFramework/Assertions/Assert.IsExactInstanceOfType.cs#L352
src/TestFramework/TestFramework/Assertions/Assert.IsExactInstanceOfType.cs(352,18): error IDE0045: (NETCORE_ENGINEERING_TELEMETRY=Build) 'if' statement can be simplified (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0045)
azure-pipelines / microsoft.testfx (Build Linux Debug)
src/TestFramework/TestFramework/Assertions/Assert.IsExactInstanceOfType.cs#L352
src/TestFramework/TestFramework/Assertions/Assert.IsExactInstanceOfType.cs(352,18): error IDE0045: (NETCORE_ENGINEERING_TELEMETRY=Build) 'if' statement can be simplified (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0045)
azure-pipelines / microsoft.testfx (Build Linux Debug)
src/TestFramework/TestFramework/Assertions/Assert.IsExactInstanceOfType.cs#L348
src/TestFramework/TestFramework/Assertions/Assert.IsExactInstanceOfType.cs(348,62): error CS0518: (NETCORE_ENGINEERING_TELEMETRY=Build) Predefined type 'System.Index' is not defined or imported
azure-pipelines / microsoft.testfx (Build Linux Debug)
src/TestFramework/TestFramework/Assertions/Assert.IsExactInstanceOfType.cs#L348
src/TestFramework/TestFramework/Assertions/Assert.IsExactInstanceOfType.cs(348,62): error CS0656: (NETCORE_ENGINEERING_TELEMETRY=Build) Missing compiler required member 'System.Index..ctor'
Loading