Linker cannot determine whether suppression is redundant if the method body is unreachable.
Open
- Dominant language
- C#
- Stars
- 392
- Forks
- 128
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 2
Description
Consider the following code:
```csharp
public static void Test ()
{
UsedToMarkMethod (null);
}
static void UsedToMarkMethod (Type t)
{
t.MethodConvertedToThrow ();
}
class Type
{
[UnconditionalSuppressMessage ("Test", "IL2072")]
public string MethodConvertedToThrow ()
{
// Trigger IL2072 warning
}
}
```
The body of `MethodConvertedToThrow ()` is unreachable and will not be processed. The linker is unable to determine whether the suppression on this method is useful.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.