https://bugzilla.novell.com/show_bug.cgi?id=337712
Summary: Wrong method picked in generic resolution => IronRuby
failure
Product: Mono: Compilers
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
QAContact: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Found By: ---
The following makes IronRuby fail to work when compiled with gmcs:
The following program should display:
GetMethodInfos X.Boolean f1(Int32, Int32)
Instead it displays:
GetMethodInfos X.Boolean f1(Int32, System.Object)
Program:
using System;
using System.Reflection;
class X {
public delegate R Function<T1, T2, R>(T1 arg1, T2 arg2);
static void Main ()
{
Delegate [] d = new Delegate [] {
new Function<int, int, bool> (f1),
};
MethodInfo[] result = new MethodInfo[d.Length];
for (int i = 0; i < d.Length; i++) {
result[i] = d[i].Method;
Console.WriteLine ("GetMethodInfos {0}.{1}", result
[i].DeclaringType, result [i]);
}
}
static bool f1 (int a, int b)
{
return false;
}
static bool f1 (int a, object b)
{
return false;
}
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs