Bug 25628 - Enums with duplicated values depends on binary search implementation
Summary: Enums with duplicated values depends on binary search implementation
Status: RESOLVED DUPLICATE of bug 41178
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-12-28 05:32 UTC by Marek Safar
Modified: 2016-05-23 07:52 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 41178

Description Marek Safar 2014-12-28 05:32:22 UTC
using System;

namespace cons234234324
{

	class MainClass
	{
		public static void Main(string[] args)
		{
			var name = Enum.GetName (typeof (WellKnownTypeTooLong), WellKnownTypeTooLong.System_IFormatProvider);
			Console.WriteLine (name); // Needs to print System_IFormatProvider and not Last
		}
	}

	internal enum WellKnownTypeTooLong
	{
		// Value 0 represents an unknown type
		Unknown = 0,

		First = 0,

		// The following type ids should be in sync with names in WellKnownTypes.metadataNames array.
		System_Math = First,
		System_Array,
		System_Attribute,
		System_CLSCompliantAttribute,
		System_Convert,
		System_Exception,
		System_FlagsAttribute,
		System_Guid,
		System_RuntimeTypeHandle,
		System_RuntimeFieldHandle,
		System_RuntimeMethodHandle,
		System_MarshalByRefObject,
		System_Type,
		System_Reflection_AssemblyKeyFileAttribute,
		System_Reflection_AssemblyKeyNameAttribute,
		System_Reflection_MethodInfo,
		System_Reflection_ConstructorInfo,
		System_Reflection_MethodBase,
		System_Reflection_FieldInfo,
		System_Reflection_MemberInfo,
		System_Reflection_Missing,
		System_Runtime_CompilerServices_RuntimeHelpers,
		System_Runtime_ExceptionServices_ExceptionDispatchInfo,
		System_Runtime_InteropServices_StructLayoutAttribute,
		System_Runtime_InteropServices_UnknownWrapper,
		System_Runtime_InteropServices_DispatchWrapper,
		System_Runtime_InteropServices_CallingConvention,
		System_Runtime_InteropServices_ClassInterfaceAttribute,
		System_Runtime_InteropServices_ClassInterfaceType,
		System_Runtime_InteropServices_CoClassAttribute,
		System_Runtime_InteropServices_ComAwareEventInfo,
		System_Runtime_InteropServices_ComEventInterfaceAttribute,
		System_Runtime_InteropServices_ComInterfaceType,
		System_Runtime_InteropServices_ComSourceInterfacesAttribute,
		System_Runtime_InteropServices_ComVisibleAttribute,
		System_Runtime_InteropServices_DispIdAttribute,
		System_Runtime_InteropServices_GuidAttribute,
		System_Runtime_InteropServices_InterfaceTypeAttribute,
		System_Runtime_InteropServices_Marshal,
		System_Runtime_InteropServices_TypeIdentifierAttribute,
		System_Runtime_InteropServices_BestFitMappingAttribute,
		System_Runtime_InteropServices_DefaultParameterValueAttribute,
		System_Runtime_InteropServices_LCIDConversionAttribute,
		System_Runtime_InteropServices_UnmanagedFunctionPointerAttribute,
		System_Activator,
		System_Threading_Tasks_Task,
		System_Threading_Tasks_Task_T,
		System_Threading_Interlocked,
		System_Threading_Monitor,
		System_Threading_Thread,
		Microsoft_CSharp_RuntimeBinder_Binder,
		Microsoft_CSharp_RuntimeBinder_CSharpArgumentInfo,
		Microsoft_CSharp_RuntimeBinder_CSharpArgumentInfoFlags,
		Microsoft_CSharp_RuntimeBinder_CSharpBinderFlags,
		Microsoft_VisualBasic_CallType,
		Microsoft_VisualBasic_Embedded,
		Microsoft_VisualBasic_CompilerServices_Conversions,
		Microsoft_VisualBasic_CompilerServices_Operators,
		Microsoft_VisualBasic_CompilerServices_NewLateBinding,
		Microsoft_VisualBasic_CompilerServices_EmbeddedOperators,
		Microsoft_VisualBasic_CompilerServices_StandardModuleAttribute,
		Microsoft_VisualBasic_CompilerServices_Utils,
		Microsoft_VisualBasic_CompilerServices_LikeOperator,
		Microsoft_VisualBasic_CompilerServices_ProjectData,
		Microsoft_VisualBasic_CompilerServices_ObjectFlowControl,
		Microsoft_VisualBasic_CompilerServices_ObjectFlowControl_ForLoopControl,
		Microsoft_VisualBasic_CompilerServices_StaticLocalInitFlag,
		Microsoft_VisualBasic_CompilerServices_StringType,
		Microsoft_VisualBasic_CompilerServices_IncompleteInitialization,
		Microsoft_VisualBasic_CompilerServices_Versioned,
		Microsoft_VisualBasic_CompareMethod,
		Microsoft_VisualBasic_Strings,
		Microsoft_VisualBasic_ErrObject,
		Microsoft_VisualBasic_FileSystem,
		Microsoft_VisualBasic_ApplicationServices_ApplicationBase,
		Microsoft_VisualBasic_ApplicationServices_WindowsFormsApplicationBase,
		Microsoft_VisualBasic_Information,
		Microsoft_VisualBasic_Interaction,

		My_InternalXmlHelper,

		// standard Func delegates - must be ordered by arity
		System_Func_T,
		System_Func_T2,
		System_Func_T3,
		System_Func_T4,
		System_Func_T5,
		System_Func_T6,
		System_Func_T7,
		System_Func_T8,
		System_Func_T9,
		System_Func_T10,
		System_Func_T11,
		System_Func_T12,
		System_Func_T13,
		System_Func_T14,
		System_Func_T15,
		System_Func_T16,
		System_Func_T17,
		System_Func_TMax = System_Func_T17,

		// standard Action delegates - must be ordered by arity
		System_Action,
		System_Action_T,
		System_Action_T2,
		System_Action_T3,
		System_Action_T4,
		System_Action_T5,
		System_Action_T6,
		System_Action_T7,
		System_Action_T8,
		System_Action_T9,
		System_Action_T10,
		System_Action_T11,
		System_Action_T12,
		System_Action_T13,
		System_Action_T14,
		System_Action_T15,
		System_Action_T16,
		System_Action_TMax = System_Action_T16,

		System_AttributeUsageAttribute,
		System_ParamArrayAttribute,
		System_NonSerializedAttribute,
		System_STAThreadAttribute,
		System_Reflection_DefaultMemberAttribute,
		System_Runtime_CompilerServices_DateTimeConstantAttribute,
		System_Runtime_CompilerServices_DecimalConstantAttribute,
		System_Runtime_CompilerServices_IUnknownConstantAttribute,
		System_Runtime_CompilerServices_IDispatchConstantAttribute,
		System_Runtime_CompilerServices_ExtensionAttribute,
		System_Runtime_CompilerServices_INotifyCompletion,
		System_Runtime_CompilerServices_InternalsVisibleToAttribute,
		System_Runtime_CompilerServices_CompilerGeneratedAttribute,
		System_Runtime_CompilerServices_AccessedThroughPropertyAttribute,
		System_Runtime_CompilerServices_CompilationRelaxationsAttribute,
		System_Runtime_CompilerServices_RuntimeCompatibilityAttribute,
		System_Runtime_CompilerServices_UnsafeValueTypeAttribute,
		System_Runtime_CompilerServices_FixedBufferAttribute,
		System_Runtime_CompilerServices_DynamicAttribute,
		System_Runtime_CompilerServices_CallSiteBinder,
		System_Runtime_CompilerServices_CallSite,
		System_Runtime_CompilerServices_CallSite_T,

		System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken,
		System_Runtime_InteropServices_WindowsRuntime_EventRegistrationTokenTable_T,
		System_Runtime_InteropServices_WindowsRuntime_WindowsRuntimeMarshal,

		Windows_Foundation_IAsyncAction,
		Windows_Foundation_IAsyncActionWithProgress_T,
		Windows_Foundation_IAsyncOperation_T,
		Windows_Foundation_IAsyncOperationWithProgress_T2,

		System_Diagnostics_Debugger,
		System_Diagnostics_DebuggerDisplayAttribute,
		System_Diagnostics_DebuggerNonUserCodeAttribute,
		System_Diagnostics_DebuggerHiddenAttribute,
		System_Diagnostics_DebuggerBrowsableAttribute,
		System_Diagnostics_DebuggerStepThroughAttribute,
		System_Diagnostics_DebuggerBrowsableState,
		System_Diagnostics_DebuggableAttribute,
		System_Diagnostics_DebuggableAttribute__DebuggingModes,

		System_ComponentModel_DesignerSerializationVisibilityAttribute,

		System_IEquatable_T,

		System_Collections_IList,
		System_Collections_ICollection,
		System_Collections_Generic_EqualityComparer_T,
		System_Collections_Generic_List_T,
		System_Collections_Generic_IDictionary_KV,
		System_Collections_Generic_IReadOnlyDictionary_KV,
		System_Collections_ObjectModel_Collection_T,
		System_Collections_ObjectModel_ReadOnlyCollection_T,
		System_Collections_Specialized_INotifyCollectionChanged,
		System_ComponentModel_INotifyPropertyChanged,
		System_ComponentModel_EditorBrowsableAttribute,
		System_ComponentModel_EditorBrowsableState,

		System_Xml_Linq_Extensions,
		System_Xml_Linq_XAttribute,
		System_Xml_Linq_XCData,
		System_Xml_Linq_XComment,
		System_Xml_Linq_XContainer,
		System_Xml_Linq_XDeclaration,
		System_Xml_Linq_XDocument,
		System_Xml_Linq_XElement,
		System_Xml_Linq_XName,
		System_Xml_Linq_XNamespace,
		System_Xml_Linq_XObject,
		System_Xml_Linq_XProcessingInstruction,

		System_Security_Permissions_SecurityAction,
		System_Security_Permissions_SecurityAttribute,
		System_Security_Permissions_SecurityPermissionAttribute,

		System_Runtime_CompilerServices_ICriticalNotifyCompletion,
		System_Runtime_CompilerServices_IAsyncStateMachine,
		System_Runtime_CompilerServices_AsyncVoidMethodBuilder,


		System_Environment,

		System_Runtime_GCLatencyMode,
		System_IFormatProvider,

		Available,
		Last = Available - 1,
	}
}
Comment 1 Marek Safar 2016-05-23 07:52:42 UTC

*** This bug has been marked as a duplicate of bug 41178 ***