Author: jbevain
Date: 2007-06-13 12:55:00 -0400 (Wed, 13 Jun 2007)
New Revision: 79450

Modified:
   trunk/cecil/lib/ChangeLog
   trunk/cecil/lib/Mono.Cecil/ReflectionHelper.cs
Log:
2007-06-13  Jb Evain  <[EMAIL PROTECTED]>

        Integrated patches by:
        Paul Apostolescu <[EMAIL PROTECTED]>

        * patch4:
          Mono.Cecil/ReflectionHelper.cs:
                Update the value type flags of types
                when they are imported if the type
                reference was first seen as a type reference.


Modified: trunk/cecil/lib/ChangeLog
===================================================================
--- trunk/cecil/lib/ChangeLog   2007-06-13 16:50:34 UTC (rev 79449)
+++ trunk/cecil/lib/ChangeLog   2007-06-13 16:55:00 UTC (rev 79450)
@@ -3,6 +3,12 @@
        Integrated patches by:
        Paul Apostolescu <[EMAIL PROTECTED]>
 
+       * patch4:
+         Mono.Cecil/ReflectionHelper.cs:
+               Update the value type flags of types
+               when they are imported if the type
+               reference was first seen as a type reference.
+
        * patch2:
          Mono.Cecil.Signature/SignatureWriter.cs:
                Patch to handle nullref values for types in

Modified: trunk/cecil/lib/Mono.Cecil/ReflectionHelper.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil/ReflectionHelper.cs      2007-06-13 16:50:34 UTC 
(rev 79449)
+++ trunk/cecil/lib/Mono.Cecil/ReflectionHelper.cs      2007-06-13 16:55:00 UTC 
(rev 79450)
@@ -226,8 +226,12 @@
                        ImportCache ();
 
                        TypeReference type = m_module.TypeReferences 
[GetTypeSignature (t)];
-                       if (type != null)
+                       if (type != null) {
+                               if (t.IsValueType && !type.IsValueType)
+                                       type.IsValueType = true;
+
                                return type;
+                       }
 
                        AssemblyNameReference asm = ImportAssembly (t.Assembly);
                        type = new TypeReference (t.Name, t.Namespace, asm, 
t.IsValueType);

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

Reply via email to