[Mono-bugs] [Bug 71449][Nor] New - [GMCS] explicit interface implementation + indexers causes syntax error
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 19 Jan 2005 07:07:40 -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 vargaz@gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=71449
--- shadow/71449 2005-01-19 07:07:40.000000000 -0500
+++ shadow/71449.tmp.29826 2005-01-19 07:07:40.000000000 -0500
@@ -0,0 +1,49 @@
+Bug#: 71449
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: vargaz@gmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [GMCS] explicit interface implementation + indexers causes syntax error
+
+When given the following code:
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+using System.Collections.Generic;
+
+interface IFoo <T>
+{
+ T this [int index] {
+ get; set;
+ }
+}
+
+public class FooCollection <T> : IFoo <T>
+{
+ T IFoo<T>.this [int index] {
+ get {
+ return default(T);
+ }
+ set {
+ }
+ }
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+gmcs aborts with
+
+readonly.cs(13) error CS1003: Syntax error, an indexer can't have type
+arguments
+Compilation failed: 1 error(s), 0 warnings
+
+while csc compiles it just fine.