Repro:
Type param = typeof(MyG<>).GetGenericArguments()[0];
Console.WriteLine(Enum.GetUnderlyingType(param));
class MyG<T> where T: Enum
{
}
Actual result: Fatal error. Internal CLR error.
Expected result: ArgumentException
The problem is that the Type.IsEnum returns true for generic arguments constrained as enums. It makes the IsEnum argument checks pass, but the code that follows does not expect generic arguments.
There are likely other places that use IsEnum for argument checks and that will have similar problem.