[Mono-bugs] [Bug 37714][Nor] New - error CS0539: Explicit implementation: `get_Item' is not a member of the interface
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Fri, 7 Feb 2003 05:30:54 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by pigolkine@gmx.de.
http://bugzilla.ximian.com/show_bug.cgi?id=37714
--- shadow/37714 Fri Feb 7 05:30:54 2003
+++ shadow/37714.tmp.4403 Fri Feb 7 05:30:54 2003
@@ -0,0 +1,134 @@
+Bug#: 37714
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: pigolkine@gmx.de
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: error CS0539: Explicit implementation: `get_Item' is not a member of the interface
+
+Description of Problem:
+ Result of compilation depends on order of methods declaration
+
+Steps to reproduce the problem:
+
+1. Compile the source :
+using System;
+using System.Collections;
+
+namespace Test {
+public class Test {
+public class ObjectCollection : IList, ICollection, IEnumerable {
+ private ArrayList collection_ = new ArrayList ();
+
+ public object this[int index] {
+ get { return collection_[index]; }
+ set { collection_[index] = value; }
+ }
+
+ object IList.this[int index] {
+ get { return collection_[index]; }
+ set { collection_[index] = value; }
+ }
+
+ public ObjectCollection () {
+ }
+ public int Count {
+ get {
+ return collection_.Count;
+ }
+ }
+ public bool IsReadOnly {
+ get {
+ return collection_.IsReadOnly;
+ }
+ }
+ bool IList.IsFixedSize {
+ get { return collection_.IsFixedSize; }
+ }
+ object ICollection.SyncRoot {
+ get { return collection_.SyncRoot; }
+ }
+ bool ICollection.IsSynchronized {
+ get { return collection_.IsSynchronized; }
+ }
+ public int Add(object item)
+ {
+ return 0;
+ }
+ public void AddRange(object[] items)
+ {
+ }
+ public void Clear()
+ {
+ }
+ public bool Contains(object value)
+ {
+ return false;
+ }
+ public void CopyTo(object[] dest,int arrayIndex)
+ {
+ }
+ void ICollection.CopyTo(Array dest,int index)
+ {
+ }
+ public IEnumerator GetEnumerator()
+ {
+ return collection_.GetEnumerator();
+ }
+ public int IndexOf(object value)
+ {
+ throw new NotImplementedException ();
+ }
+ public void Insert(int index,object item)
+ {
+ }
+ public void Remove(object value)
+ {
+ }
+ public void RemoveAt(int index)
+ {
+ }
+ } // --- end of ComboBox.ObjectCollection ---
+
+ public static void Main( String[] argv) {
+ }
+ }
+}
+
+2. Move the method
+
+ object IList.this[int index] {
+ get { return collection_[index]; }
+ set { collection_[index] = value; }
+ }
+
+from line 14 up, before
+
+ public object this[int index] {
+
+Actual Results:
+
+ in step 1:
+error CS0539: Explicit implementation: `get_Item' is not a member of the
+interface
+ in step 2:
+Compilation succeeded
+
+Expected Results:
+ Compilation succeeded in both cases.
+
+How often does this happen?
+ Always
+
+
+Additional Information: