Skip to content

Fix test warnings: Use typeof(TestType) instead of o.GetType() to avo…

025264e
Select commit
Loading
Failed to load commit list.
Open

Fix trimming analyzer missing diagnostics for method calls in field access expressions #123040

Fix test warnings: Use typeof(TestType) instead of o.GetType() to avo…
025264e
Select commit
Loading
Failed to load commit list.
Build Analysis / Build Analysis failed Jan 15, 2026 in 0s

.NET Result Analysis

Details

Tip

To unconditionally bypass the build analysis check (turn it green), you can use the escape mechanism feature. The completion time may vary, potentially taking several minutes, depending on the build analysis workload at the moment.

Test Failures (3 tests failed)

🔹 [All failing tests from dotnet-linker-tests]

    ⚠️ 2 failing tests not displayed for this pipeline due to space limitations

    ILLink.RoslynAnalyzer.Tests.DataFlowTests.FieldDataFlow [Details] [0.28% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configurations (3)

    Exception Message
    Unexpected warnings were generated:\n/__w/1/s/src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/FieldDataFlow.cs(239,17): warning IL2072: 'unused' argument does not satisfy 'DynamicallyAccessedMemberTypes.All' in call to 'Mono.Linker.Tests.Cases.DataFlow.FieldDataFlow.AccessReturnedInstanceField.GetInstance(Type)'. The return value of method 'Mono.Linker.Tests.Cases.DataFlow.FieldDataFlow.GetUnknownType()' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.\n/__w/1/s/src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/FieldDataFlow.cs(253,17): warning IL2072: 'unused' argument does not satisfy 'DynamicallyAccessedMemberTypes.All' in call to 'Mono.Linker.Tests.Cases.DataFlow.FieldDataFlow.AccessReturnedInstanceField.GetInstance(Type)'. The return value of method 'Mono.Linker.Tests.Cases.DataFlow.FieldDataFlow.GetUnknownType()' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
    CallStack
       at ILLink.RoslynAnalyzer.Tests.TestChecker.Check(Boolean allowMissingWarnings) in /__w/1/s/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/TestChecker.cs:line 73
       at ILLink.RoslynAnalyzer.Tests.TestCaseUtils.RunTestFile(String suiteName, String testName, Boolean allowMissingWarnings, ValueTuple`2[] msbuildProperties) in /__w/1/s/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/TestCaseUtils.cs:line 86
    --- End of stack trace from previous location ---

Was this helpful? Yes No