Reflection: Fix DefaultValue exception with enums (#17917)
Reflection: Fix DefaultValue exception with enums (#17917)

This is related to dbcfd2f9d1, but about enums instead of `DateTime`.

Given e.g. a generic method with a parameter `T arg = default(T)`
where `T` is the generic type parameter, if that is instantiated with
some enum as the generic type argument, then querying the default
value of `arg` using `ParameterInfo.[Raw]DefaultValue` will throw a
`FormatException`.

(The use of generics means that the C# compiler always records a
`null` constant in metadata, which isn't usually the case for enums.)
poizan42/coreclr,mmitche/coreclr,mmitche/coreclr,wtgodbe/coreclr,mmitche/coreclr,cshung/coreclr,poizan42/coreclr,krk/coreclr,krk/coreclr,cshung/coreclr,krk/coreclr,poizan42/coreclr,krk/coreclr,krk/coreclr,mmitche/coreclr,mmitche/coreclr,cshung/coreclr,mmitche/coreclr,krk/coreclr,poizan42/coreclr,poizan42/coreclr,wtgodbe/coreclr,poizan42/coreclr,wtgodbe/coreclr,wtgodbe/coreclr,cshung/coreclr,cshung/coreclr,wtgodbe/coreclr,cshung/coreclr,wtgodbe/coreclr