Browse Source

2004-07-02 Zoltan Varga <[email protected]>

	* EnumBuilder.cs (CreateType): Call a new icall to set the internal
	type field. Fixes #59833.

svn path=/trunk/mcs/; revision=30620
Zoltan Varga 21 years ago
parent
commit
f1af90bdee

+ 4 - 0
mcs/class/corlib/System.Reflection.Emit/ChangeLog

@@ -1,3 +1,7 @@
+2004-07-02  Zoltan Varga  <[email protected]>
+
+	* EnumBuilder.cs (CreateType): Call a new icall to set the internal
+	type field. Fixes #59833.
 
 Thu Jun 24 15:33:04 CEST 2004 Paolo Molaro <[email protected]>
 

+ 6 - 1
mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs

@@ -139,9 +139,14 @@ namespace System.Reflection.Emit {
 
 		public Type CreateType ()
 		{
-			return _tb.CreateType ();
+			Type res = _tb.CreateType ();
+			setup_enum_type (res);
+			return res;
 		}
 
+		[MethodImplAttribute(MethodImplOptions.InternalCall)]
+		private extern void setup_enum_type (Type t);
+
 		public FieldBuilder DefineLiteral (string literalName, object literalValue)
 		{
 			FieldBuilder fieldBuilder = _tb.DefineField (literalName,