dotnet / dotnet/linker

[DAM Analyzer] discrepancy on which warning should be produced in action case

Open
#2,350 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
392
Forks
128
Avg merge
2d 10h
Merged PRs (30d)
2

Description

See the following test in linker RequiresInCompilerGeneratedCode.cs file
```C#
[ExpectedWarning ("IL2077", CompilerGeneratedCode = true, ProducedBy = ProducedBy.Trimmer)]
[ExpectedWarning ("IL2067", ProducedBy = ProducedBy.Analyzer)]
[RequiresUnreferencedCode ("Suppress in body")]
static async void TestMethodParameterWithRequirements (Type unknownType = null)
{
Action _ = () => unknownType.RequiresNonPublicMethods ();
}
```
Linker generated IL2077 while Analyzer generates IL2067. I'm not sure the specifics on which one should be used so I'm letting both be generated in the file until a fix makes them generate the same warning.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.