Analyzer: If type is used as a generic argument to a new constrain RUC on default .ctor should be reported
Open
area-Linker: Diagnostic
- Dominant language
- C#
- Stars
- 392
- Forks
- 128
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 2
Description
```C#
void Test ()
{
// IL2026 Foo
Method();
}
class ResultType {
[RequiresUnreferencedCode("Foo")]
public ResultType() { }
}
static void Method () where T : new() { }
```
If a type is used in a generic parameter which has the new constraint, then trimmer must assume its default .ctor is going to be called. If that .ctor has a RUC annotation a warning should be reported.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.