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
classEnumOrderTest{enumEnumA{Item1=1,Item0=0}enumEnumB{Item1=1,Item0}voidTest(){// This is expected to fail since EnumB.Item0 is compiled with a value of 2 following Item1.System.Diagnostics.Debug.Assert((int)EnumA.Item0==(int)EnumB.Item0);}}
Erroneous output
#define DEBUG
usingSystem.Diagnostics;internalclassEnumOrderTest{privateenumEnumA{Item1=1,Item0// Will be implicitly assigned the value '2'}privateenumEnumB{Item1=1,Item0}privatevoidTest(){Debug.Assert(condition:false);}}
When recompiled EnumA.Item0 will have the value 2 instead of 0.
Details
Tested with ILSpy at commit d91732f.
Input code compiled in debug mode to retain the Assert.
This is a regression from when I last tested. I was previously using commit d69137a.
The text was updated successfully, but these errors were encountered:
Input code
Erroneous output
When recompiled EnumA.Item0 will have the value 2 instead of 0.
Details
Tested with ILSpy at commit d91732f.
Input code compiled in debug mode to retain the Assert.
This is a regression from when I last tested. I was previously using commit d69137a.
The text was updated successfully, but these errors were encountered: