[Mono-bugs] [Bug 537768] New: Expression.Call with generic parameters fails with "Too much method candidates"
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Sep 9 11:13:43 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=537768
Summary: Expression.Call with generic parameters fails with
"Too much method candidates"
Classification: Mono
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Core
AssignedTo: jbevain at novell.com
ReportedBy: ck at carlo-kok.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.2)
Gecko/20090729 Firefox/3.5.2
code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
namespace ConsoleApplication65
{
class Program
{
static void Main(string[] args)
{
Type elementType = typeof(string);
IEnumerable<String> x = new List<string>();
Expression p = Expression.Constant(x, typeof(IEnumerable<String>));
Expression.Call(typeof(Queryable), "AsQueryable", new Type[]
{elementType}, p);
}
}
}
works on .NET 3.5; fails on mono 2.4.2.3; There is only 1 overload with a
generic parameter for AsQueryable; although p will fit in both.
Reproducible: Always
Steps to Reproduce:
1. Compile
2. Run
3. Look at the results
Actual Results:
Unhandled Exception: System.InvalidOperationException: Too much method
candidate
s
at System.Linq.Expressions.Expression.TryGetMethod (System.Type type,
System.S
tring methodName, BindingFlags flags, System.Type[] parameterTypes,
System.Type[
] argumentTypes) [0x00000]
at System.Linq.Expressions.Expression.Call (System.Type type, System.String
me
thodName, System.Type[] typeArguments, System.Linq.Expressions.Expression[]
argu
ments) [0x00000]
at ConsoleApplication65.Program.Main (System.String[] args) [0x00000]
Expected Results:
Succeess
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list