[Mono-bugs] [Bug 357737] New: gmcs fails to resolve indexers on generic constrained types

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jan 31 13:55:45 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=357737


           Summary: gmcs fails to resolve indexers on generic constrained
                    types
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jbevain at novell.com
         QAContact: mono-bugs at lists.ximian.com
                CC: meebey at meebey.net
          Found By: ---


Repro:

--
using System;
using System.Collections;

public class Protocol : Hashtable {}

public class Item : Protocol {}

public class Foo<T> where T : Protocol
{
        public void Test (T t)
        {
                Console.WriteLine (t ["foo"]);
        }
}

class Program {

        static void Main ()
        {
                var i = new Item ();
                i ["foo"] = "foo";

                var f = new Foo<Item> ();
                f.Test (i);
        }
}
--


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list