[Mono-bugs] [Bug 72131][Nor] New - Gmcs does not check inheritance whith generic interfaces

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 2 Feb 2005 12:28:05 -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 cl.koppensteiner@kabsi.at.

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

--- shadow/72131	2005-02-02 12:28:05.000000000 -0500
+++ shadow/72131.tmp.3686	2005-02-02 12:28:05.000000000 -0500
@@ -0,0 +1,39 @@
+Bug#: 72131
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: cl.koppensteiner@kabsi.at               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Gmcs does not check inheritance whith generic interfaces
+
+Following code produces the error "CS0117: `T' does not contain a
+definition for `DoSomeThing'" on a current 1.1.4 snapshot.
+
+public interface IBase
+{
+	void DoSomeThing();
+}
+
+public interface IExtended : IBase
+{
+	void DoSomeThingElse();
+}
+
+public class MyClass<T> where T: IExtended, new()
+{
+	public MyClass()
+	{
+		T instance = new T();
+		instance.DoSomeThing();
+	}
+}