Uh oh!
There was an error while loading. Please reload this page.
delete enum support for bool as an underlying type - #79962
Conversation
ghost
commented
Dec 25, 2022
Tagging subscribers to this area: @dotnet/area-system-runtime |
vargaz
commented
Dec 28, 2022
The mono changes look ok to me. |
Uh oh!
There was an error while loading. Please reload this page.
stephentoub
left a comment
There was a problem hiding this comment.
Changes LGTM. @jkotas, your suggestion was about considering removing bool; we later got data confirming it's very rarely (but not 100% never) used. Still want to nuke it?
| ### II.14.3 Enums (page 168) | ||
| Enum support for bool as underlying type was deleted (see [issue 79224](https://github.com/dotnet/runtime/issues/79224)). |
There was a problem hiding this comment.
This change is deleting the bool backed enum support from the reflection stack.
The bool backed enums are still going to work loaded fine by the type loader. I think that it is the right tradeoff between compat and simplicity. The type loader support for bool backed enums is very cheap and simple.
ECMA-335 and this doc is concerned about the behavior of the core runtime (that is not changing), not about behavior of BCL APIs. I think this note should be deleted.
There was a problem hiding this comment.
What is the 'type loader' ?
There was a problem hiding this comment.
Type loader is a component responsible for loading types.
For example, Console.WriteLine(typeof(BoolEnum)); is still going to work fine even with these changes because the type loader still works fine for bool enums with these changes.
Yes, I think it is fine to nuke it from parsing, formatting and conversions. I would keep it in the core type loader - it does not cost anything there. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
akoeplinger
commented
Jan 13, 2023
Can we update https://github.com/dotnet/runtime/blob/main/docs/design/specs/Ecma-335-Augments.md with this? |
stephentoub
commented
Jan 13, 2023
akoeplinger
commented
Jan 13, 2023
ah ok, thanks |
Added When you commit this breaking change:
Tagging @dotnet/compat for awareness of the breaking change. |
Partial revert of dotnet#79962Fixesdotnet#80890
jkotas
commented
Jan 20, 2023
Breaking change doc issue dotnet/docs#33647 |
Partial revert of dotnet#79962Fixesdotnet#80890
jkotas
commented
Oct 16, 2023
Breaking change doc created by dotnet/docs#36505 |
Fixes#79224