Closed vitek-karas closed 2 years ago
Had to disable the new tests when targeting .NET Framework. The tests are using CodeDOM compiler in that case and it doesn't support parsing enums on generic type as attribute arguments. I don't think the tests are important enough to try to rework how the tests are working on .NET Framework and make them use Roslyn there as well.
Beautiful, thank you!
Fixes both the reader and the write to correctly handle values of type enum on a generic type. Cecil represents generic instantiations as typeref which has etype GenericInst, so the exising check for etype doesn't work. Also since attributes only allow simple values and enums (and types), there's technically no other way to get a GenericInst then the enum case.
Added several test for various combinations of boxed an unboxed enums on generic type.
Added a test case provided by @mrvoorhe with array of such enums.
Fixes #804