[Mono-bugs] [Bug 492277] New: Properties with the same name as an explicitly implemented interface property cannot modify accorsor visibility

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Apr 4 19:03:15 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=492277


           Summary: Properties with the same name as an explicitly
                    implemented interface property cannot modify accorsor
                    visibility
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.4.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: lunchtimemama at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development


Test Case:
interface I {
    int this[int i] { get; set; }
}

class C : I {
    int I.this[int i] {
        get { return i; }
        set { }
    }

    public int this[int i] {
        get { return i; }
        private set { }
    }
}

Expected Result:
It should compile (it does in csc).

Actual Result:
It fails with the following error:
Accessor `C.this[int].set' must be declared public to implement interface
member `I.this[int].set'(CS0277)

-- 
Configure bugmail: http://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