Closed LakshanF closed 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 { }
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!
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.
Fixes #38 by adding helper methods in the analyzer and re-writer to support
TypeSpec
signature