2002-09-25 Miguel de Icaza <miguel@ximian.com>
authorMiguel de Icaza <miguel@gnome.org>
Wed, 25 Sep 2002 20:58:38 +0000 (20:58 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Wed, 25 Sep 2002 20:58:38 +0000 (20:58 -0000)
* expression.cs (ArrayAccess.EmitAssign): Mimic the same test from
EmitDynamicInitializers for the criteria to use Ldelema.  Thanks
to hwang_rob@yahoo.ca for finding the bug and providing a patch.

svn path=/trunk/mcs/; revision=7816

mcs/mcs/ChangeLog
mcs/mcs/expression.cs

index 3385ae45b57985a0486a2ca41008782c2451fb90..d3b4ed0b83938d679cebcc95f5b208d2f2b77e1f 100755 (executable)
@@ -1,5 +1,9 @@
 2002-09-25  Miguel de Icaza  <miguel@ximian.com>
 
+       * expression.cs (ArrayAccess.EmitAssign): Mimic the same test from
+       EmitDynamicInitializers for the criteria to use Ldelema.  Thanks
+       to hwang_rob@yahoo.ca for finding the bug and providing a patch.
+
        * ecore.cs (TryImplicitIntConversion): When doing an
        implicit-enumeration-conversion, check if the type is 64-bits and
        perform a conversion before passing to EnumConstant.
index c7bd0bcbd5f38ad27831ca287868590273df973b..3d92824397d58a672b217d1faba2da7aa0dd9c35 100755 (executable)
@@ -6217,7 +6217,7 @@ namespace Mono.CSharp {
                        // pair
                        //
                        if (rank == 1){
-                               if (t.IsValueType && !TypeManager.IsBuiltinType (t))
+                               if (t.IsSubclassOf (TypeManager.value_type) && (!TypeManager.IsBuiltinType (t) || t == TypeManager.decimal_type))
                                        ig.Emit (OpCodes.Ldelema, t);
                        }