-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
There are numerous test for Enum types backed by float or double in EnumTests.cs and EnumTests.netcoreapp.cs.
The ECMA specification doesn't allow these Enum types:
The symbols of an enum are represented by an underlying integer type: one of { bool, char, int8, unsigned int8, int16, unsigned int16, int32, unsigned int32, int64, unsigned int64, native int, unsigned native int }
(ECMA CLR standard, §II.14.3)
Moreover, in many cases the tests actually expect a broken behaviour like incorrect parsing of values or Enum.GetNames/Enum.GetValues not returning results sorted by the values:
I believe these tests should be removed, CoreCLR should not allow float- and double- backed enums and there should be test verifying that such enums cannot be created.
/cc @jkotas