Author: jbevain
Date: 2008-01-30 10:10:12 -0500 (Wed, 30 Jan 2008)
New Revision: 94385

Modified:
   trunk/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
Log:
fix ArrayIndex

Modified: trunk/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/Expression.cs   
2008-01-30 15:05:30 UTC (rev 94384)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/Expression.cs   
2008-01-30 15:10:12 UTC (rev 94385)
@@ -841,8 +841,8 @@
                                throw new ArgumentException ("The number of 
arguments doesn't match the rank of the array");
 
                        foreach (var arg in args)
-                               if (arg.Type != typeof (int))
-                                       throw new ArgumentException ("The index 
must be of type int");
+                               if (!IsInt (arg.Type))
+                                       throw new ArgumentException ("The index 
must be an integer");
 
                        return Call (array, array.Type.GetMethod ("Get", 
PublicInstance), args);
                }

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

Reply via email to