MichalStrehovsky / iltrim

MIT License
9 stars 1 forks source link

Support for TypeSpec sginature #48

Closed LakshanF closed 2 years ago

LakshanF commented 2 years ago

Fixes #38 by adding helper methods in the analyzer and re-writer to support TypeSpecsignature

MichalStrehovsky commented 2 years ago

Would it be possible to add a test? Something along the lines of:

[Kept]
class Program
{
    [Kept]
    static void Main()
    {
        _ = typeof(SomeType<SomeOtherType>);
    }
}

[Kept]
class SomeType<T> { }

[Kept]
class SomeOtherType { }
LakshanF commented 2 years ago

I added a test but am having trouble running it in VS or command line (I followed the team thread on this but couldn't get it working). I tested the same by modifying "src\coreclr\tools\ILTrim\repro\Program.cs" and that worked!

vitek-karas commented 2 years ago

The test class has to have the same name as the file - this allows the infra to ignore any other classes in that file. It does not fail if it can't find any such class - simply won't run any test there. I fixed it.