Author: ankit
Date: 2006-01-09 11:17:37 -0500 (Mon, 09 Jan 2006)
New Revision: 55239

Added:
   trunk/mcs/ilasm/tests/gen-recur.il
Modified:
   trunk/mcs/ilasm/codegen/ChangeLog
   trunk/mcs/ilasm/codegen/TypeDef.cs
   trunk/mcs/ilasm/tests/ChangeLog
Log:
In ilasm/tests:

        * gen-recur.il: New. Test for a class implementing a generic interface
        with the class itself as the argument.

In ilasm/codegen:
        * TypeDef.cs (TypeDef.Define): Set is_defined to true as soon as the
        Peapi type gets created.


Modified: trunk/mcs/ilasm/codegen/ChangeLog
===================================================================
--- trunk/mcs/ilasm/codegen/ChangeLog   2006-01-09 16:12:24 UTC (rev 55238)
+++ trunk/mcs/ilasm/codegen/ChangeLog   2006-01-09 16:17:37 UTC (rev 55239)
@@ -1,5 +1,10 @@
 2006-01-09  Ankit Jain  <[EMAIL PROTECTED]>
 
+       * TypeDef.cs (TypeDef.Define): Set is_defined to true as soon as the
+       Peapi type gets created.
+
+2006-01-09  Ankit Jain  <[EMAIL PROTECTED]>
+
        * GenericTypeRef.cs: Rename to ..
        * GenericParamRef.cs: .. this.
        (IGenericTypeRef): New.

Modified: trunk/mcs/ilasm/codegen/TypeDef.cs
===================================================================
--- trunk/mcs/ilasm/codegen/TypeDef.cs  2006-01-09 16:12:24 UTC (rev 55238)
+++ trunk/mcs/ilasm/codegen/TypeDef.cs  2006-01-09 16:17:37 UTC (rev 55239)
@@ -331,6 +331,8 @@
                                         classdef.SpecialNoSuper ();
                         }
 
+                        is_defined = true;
+
                         if (size != -1 || pack != -1)
                                 classdef.AddLayoutInfo ( (pack == -1) ? 1 : 
pack, (size == -1) ? 0 : size);
 
@@ -345,7 +347,6 @@
                                 gen_params.Resolve (code_gen, classdef);
 
                         is_intransit = false;
-                        is_defined = true;
 
                         code_gen.AddToDefineContentsList (this);
                 }

Modified: trunk/mcs/ilasm/tests/ChangeLog
===================================================================
--- trunk/mcs/ilasm/tests/ChangeLog     2006-01-09 16:12:24 UTC (rev 55238)
+++ trunk/mcs/ilasm/tests/ChangeLog     2006-01-09 16:17:37 UTC (rev 55239)
@@ -1,3 +1,8 @@
+2006-01-09  Ankit Jain  <[EMAIL PROTECTED]>
+
+       * gen-recur.il: New. Test for a class implementing a generic interface
+       with the class itself as the argument.
+
 2006-01-07  Ankit Jain  <[EMAIL PROTECTED]>
 
        * gen-constraints1.il: New. Test for constraints on generic parameters.

Added: trunk/mcs/ilasm/tests/gen-recur.il
===================================================================
--- trunk/mcs/ilasm/tests/gen-recur.il  2006-01-09 16:12:24 UTC (rev 55238)
+++ trunk/mcs/ilasm/tests/gen-recur.il  2006-01-09 16:17:37 UTC (rev 55239)
@@ -0,0 +1,34 @@
+.assembly extern mscorlib
+{
+  .ver 2:0:0:0
+}
+.assembly 'gen-recur'
+{
+  .custom instance void class 
[mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor()
 =  (
+               01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   // 
....T..WrapNonEx
+               63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01       ) // 
ceptionThrows.
+
+  .ver  0:0:0:0
+}
+.module 'gen-recur.dll'
+
+  .class interface private auto ansi abstract IFace`1<T>
+  {
+  }
+
+  .class private auto ansi beforefieldinit test
+       extends [mscorlib]System.Object
+       /* class test, implements an interface whose generic arg is
+          test itself */
+       implements class IFace`1<class test>  {
+
+    .method public hidebysig  specialname  rtspecialname 
+           instance default void .ctor ()  cil managed 
+    {
+       .maxstack 8
+       IL_0000:  ldarg.0 
+       IL_0001:  call instance void object::.ctor()
+       IL_0006:  ret 
+    }
+
+  }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to