Closed xumix closed 1 year ago
The idea was to treat enum values as ordinal constant literals, it is how they are perceived from a programmer's perspective.
IEnum will get EnumUnderlyingType
or UnderlyingType
property in the next version.
Enum values are Members AFAIR Thanks for your fast reaction!
Yes, they are implemented as a const field by the runtime, but I preferred to use language-level abstraction.
Wow, looks like I misread your comment: I expected IEnumValue
to get DeclaringType
but instead you implemented UnderlyingType for IEnum
.
So I expected ability to get the Type that defines IEnumValue, so I could use it like this:
let someConst = {{enumValue.DeclaringType}}.{{enumValue.Value}};
but actually got the ability to get Enum's base type which is completely different feature
OMG, I have no idea how I messed up Declaring type
with UnderlyingType
, I should not write code during summer vacations :D.
Anyway, why would you need DeclaringType
on IEnumValue? IEnumValue as I remember is only available in the context of IEnum.Values
, thus declaring type should always be known ....
Hi! Thanks for your great lib! It looks like IEnumValue lacks ISymbolBase inheritance thus there is no way to get Declaring type info