Skip to content

Enum constants are decompiled as their underlying type #94

@cervengoc

Description

@cervengoc

It seems like decompiling an expression like this results loosing the enum type of the constant TestEnum.First, and having only an Int32 value of 1.

public enum TestEnum {
  None = 0,
  First = 1,
  Second = 2
}

public class Test {
  public TestEnum EnumProperty { get; set; }
  [Decompileable]
  public bool IsFirst { get { return EnumProperty == TestEnum.First; } }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions