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


           Summary: Incorrect CS0229 between indexers and type
    Classification: Mono
           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]
          Found By: ---


class Item
{
    public static int Foo = 42;

    public class Builder 
    {
        public int Foo {
            get { return Item[1].Foo; }
        }

        public object this [int field] {
            get { return null; }
        }

        public object this [int field, int i] {
            get { return null; }
        }

    }
}

class Program {

    static void Main ()
    {
    }
}


Actual error:

1.cs(8,38): error CS0229: Ambiguity between `Item.Builder.this[int]' and
`Item.Builder.this[int, int]'
1.cs(11,31): (Location of the symbol related to previous error)

Expected:

No error


The issues seems to be the way how we are looking for indexers, presumably we
should not be using indexer name but different MemberType

-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to