Investigate trimming of static interface methods when the interface is not used
Open
area-Linker: Steps
- Dominant language
- C#
- Stars
- 392
- Forks
- 128
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 2
Description
Currently linker will keep the interface if there's a method which implements one of the static interface methods on it and that implementation method is kept. This is unlike non-static interface methods where the same situation still allows the linker to remove the interface.
Sample:
```C#
void Main()
{
TestClass.Method (); // Use the implementation method only
}
[Kept] // ??? Why
interface IStaticIFace
{
[Kept] // ??? Why
static abstract Method();
}
[Kept] // This is correct
class TestClass : IStaticIFace
{
[Kept] // This is correct
public static abstract Method() {};
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.