How to reproduce:
- Open the attached "IN-159458" project
- From the menu bar, select "Bug Hunt" > "Run Toggle State Probe"
- Observe the "Unsigned64 bit 40" entry of the "Toggle state probe results" message in the Console window
Actual results: The entry shows "actual": "False"
Expected results: The entry shows "actual": "True"
Reproducible with: 6000.0.0f1, 6000.7.0b10, 7000.0.0a18
Reproducible on: Windows 10 (by user), Windows 11
Not reproducible on: No other environments tested
Notes:
- Every bit above bit 31 is lost in both long and ulong Flags enums (bits 32, 40 and 63 were checked)
- Converting only bit 31 wrongly selects bit 40 as well
- ToggleButtonGroupState.Compare has the same problem as it returns False when the state and the enum hold the same bit 40
- Creating the state with new ToggleButtonGroupState(1UL << 40, 64) instead of FromEnumFlags keeps bit 40