[Mono-bugs] [Bug 80314][Wis] New - Implementing a generic interface cannot find a nested type

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Dec 19 09:22:12 EST 2006


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 rook at roo.k.pl.

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

--- shadow/80314	2006-12-19 09:22:12.000000000 -0500
+++ shadow/80314.tmp.5220	2006-12-19 09:22:12.000000000 -0500
@@ -0,0 +1,40 @@
+Bug#: 80314
+Product: Mono: Compilers
+Version: 1.2
+OS: GNU/Linux [Other]
+OS Details: FC4 mono 1.2.2.1
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: rook at roo.k.pl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Implementing a generic interface cannot find a nested type
+
+GMCS can't compile the following code.
+Bails out with:
+error CS0426: The nested type `Foo' does not exist in the type `Temp<T>'
+
+using System.Collections.Generic;
+using System.Collections;
+public class Temp<T> : IEnumerable<Temp<T>.Foo>
+{
+    public class Foo {}
+
+    public IEnumerator<Temp<T>.Foo> GetEnumerator()
+    {
+        yield return new Foo();
+    }
+
+    IEnumerator IEnumerable.GetEnumerator()
+    {
+        return GetEnumerator();
+    }
+}
+
+if I remove the generic parameter, everythoing compiles fine.


More information about the mono-bugs mailing list