Author: marek Date: 2008-01-18 11:04:20 -0500 (Fri, 18 Jan 2008) New Revision: 93269
Modified: trunk/mcs/mcs/ChangeLog trunk/mcs/mcs/generic.cs Log: 2008-01-18 Marek Safar <[EMAIL PROTECTED]> A fix for bug #353526 * generic.cs: A type inference of params arguments may not required any temporary array creation. Modified: trunk/mcs/mcs/ChangeLog =================================================================== --- trunk/mcs/mcs/ChangeLog 2008-01-18 15:34:33 UTC (rev 93268) +++ trunk/mcs/mcs/ChangeLog 2008-01-18 16:04:20 UTC (rev 93269) @@ -1,5 +1,11 @@ 2008-01-18 Marek Safar <[EMAIL PROTECTED]> + A fix for bug #353526 + * generic.cs: A type inference of params arguments may not required any + temporary array creation. + +2008-01-18 Marek Safar <[EMAIL PROTECTED]> + A fix for bug #353534 * generic.cs, ecore.cs, expression.cs: A method group type inference is supported for delegates only. Modified: trunk/mcs/mcs/generic.cs =================================================================== --- trunk/mcs/mcs/generic.cs 2008-01-18 15:34:33 UTC (rev 93268) +++ trunk/mcs/mcs/generic.cs 2008-01-18 16:04:20 UTC (rev 93269) @@ -2522,14 +2522,17 @@ // Type method_parameter = null; for (int i = 0; i < arg_count; i++) { + Argument a = (Argument) arguments [i]; + if (i < params_arguments_start) { method_parameter = methodParameters.Types [i]; } else if (i == params_arguments_start) { - method_parameter = TypeManager.GetElementType (methodParameters.Types [params_arguments_start]); + if (arg_count == params_arguments_start + 1 && TypeManager.HasElementType (a.Type)) + method_parameter = methodParameters.Types [params_arguments_start]; + else + method_parameter = TypeManager.GetElementType (methodParameters.Types [params_arguments_start]); } - Argument a = (Argument) arguments[i]; - // // When a lambda expression, an anonymous method // is used an explicit argument type inference takes a place _______________________________________________ Mono-patches maillist - Mono-patches@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-patches