[Mono-bugs] [Bug 63102][Nor] New - Overlapping interface cause error CS0535

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 15 Aug 2004 21:56:37 -0400 (EDT)


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 etienne@novat.qc.ca.

http://bugzilla.ximian.com/show_bug.cgi?id=63102

--- shadow/63102	2004-08-15 21:56:37.000000000 -0400
+++ shadow/63102.tmp.7602	2004-08-15 21:56:37.000000000 -0400
@@ -0,0 +1,54 @@
+Bug#: 63102
+Product: Mono: Compilers
+Version: unspecified
+OS: SUSE 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: etienne@novat.qc.ca               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Overlapping interface cause error CS0535
+
+When a class implements two interfaces that overlap, mcs gives a CS0535 
+error when it should not. Exemple:
+
+namespace MyNamespace
+{
+    class Implementation : IGet, IGetSet
+    {
+        static void Main(string[] args)
+        {
+
+        }
+
+        public int this[int index]
+        {
+            get { return 0; }
+            set { }
+        }
+    }
+
+    interface IGet
+    {
+        int this[int index] { get; }
+    }
+
+    interface IGetSet
+    {
+        int this[int index] { get; set; }
+    }
+}
+
+This gives the following error:
+Program.cs(3) error CS0535: 'MyNamespace.Implrementation' does not 
+implement interface member 'MyNamespace.IGetSet.this[int]'
+
+Under .NET 2.0, the only Microsoft runtime I currently have installed, 
+this compiles without any error or warning.