* Expression.cs (Call): properly deal with zero length array
of type arguments for non generic methods. Fixes #568989.
svn path=/trunk/mcs/; revision=149240
+2010-01-08 Jb Evain <jbevain@novell.com>
+
+ * Expression.cs (Call): properly deal with zero length array
+ of type arguments for non generic methods. Fixes #568989.
+
2009-12-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
* Expression.cs: expression can be null for static getters. Patch from
if (method == null)
return null;
- if (!method.IsGenericMethod && args == null)
+ if (!method.IsGenericMethod && (args == null || args.Length == 0))
return method;
if (args.Length == method.GetGenericArguments ().Length)
throw new ArgumentNullException ("expression");
if (!expression.Type.IsAssignableTo (propertyAccessor.DeclaringType))
throw new ArgumentException ("expression");
- }
+ }
//
// .NET does not mandate that if the property is static, that the expression must be null
// fixes a bug exposed by Orchard's ContentItemRecordAlteration.Alteration