You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JIT: (bug) Enum.Equals folding returns true for different shared-generic nested enum types #134890
Yes, regression in .NET 11 (introduced by #122779). .NET 8.0, 9.0 and 10.0 print False. .NET 11.0-rc2 and main print True.
Notes
gtFoldExprCall (NI_System_Enum_Equals) compares canonical class handles (both are C<__Canon>.E) and folds the call to a payload compare. It needs an eeIsSharedInst bailout (or an exact-type check), like the one in gtOptimizeEnumHasFlag.
Activity
dotnet-policy-service commentedon Sep 29, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
Fix Enum.Equals folding for shared-generic nested enums (#134898)