Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix custom attribute with enum on generic type #827

Merged
merged 2 commits into from
Feb 21, 2022

Commits on Feb 1, 2022

  1. Fix custom attribute with enum on generic type

    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.
    vitek-karas committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    96ad114 View commit details
    Browse the repository at this point in the history
  2. Disable the new tests on .NET 4

    The CodeDom compiler doesn't support parsing enums on generic types in attributes (uses the "old" csc.exe from framework).
    vitek-karas committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    b7c8248 View commit details
    Browse the repository at this point in the history