https://bugzilla.novell.com/show_bug.cgi?id=337712#c2


Miguel de Icaza <[EMAIL PROTECTED]> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
             Status|RESOLVED                                        |REOPENED
         Resolution|FIXED                                           |




--- Comment #2 from Miguel de Icaza <[EMAIL PROTECTED]>  2007-11-04 21:30:03 
MST ---
Ah, bugzilla finally came up again.

This is a different variant from the old bug, I already emailed Marek
privately, but am adding this to Bugzilla as well;   Am reopening the bug
because it is on the same spirit (and it also came from IronRuby for the same
kind of tests).

In this instance, the variation is that it never picks the most-specific
version of the method (bool f2(IList, IList)).   This program should display
the two different methods.

using System.Collections;
using System;
using System.Reflection;

class X {
        public delegate R Function<T1, T2, R>(T1 arg1, T2 arg2);

        static void Main ()
        {
                Delegate [] e = new Delegate [] {
                        new Function<IList,IList,bool> (f2),
                        new Function<IList,object,bool> (f2)
                };
                Console.WriteLine ("The following should display two different
instantiations:");
                Dump (e);
        }

        static void Dump (Delegate [] d)
        {
                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 f2 (IList self, IList other) {return false;}
        static bool f2 (IList self, object other) {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

Reply via email to