[Mono-bugs] [Bug 65764][Nor] New - mcs does not handle interfaces that indirectly extend other interface

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 12 Sep 2004 13:51:40 -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 gert.driesen@pandora.be.

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

--- shadow/65764	2004-09-12 13:51:40.000000000 -0400
+++ shadow/65764.tmp.10960	2004-09-12 13:51:40.000000000 -0400
@@ -0,0 +1,73 @@
+Bug#: 65764
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gert.driesen@pandora.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs does not handle interfaces that indirectly extend other interface
+
+Apparently, mcs does not handle interfaces that directly extend other
+interface :
+
+For example :
+
+.assembly bug {}
+
+.class interface public abstract IA
+{
+  .method public abstract virtual
+          instance void  methodA() cil managed
+  {
+  }
+}
+
+.class interface public abstract IA2
+       implements IA
+{
+  .method public abstract virtual
+          instance void  methodA2() cil managed
+  {
+  }
+}
+
+.class interface public abstract IB
+       implements IA2
+       // , IA
+{
+  .method public abstract virtual
+          instance void  methodB() cil managed
+  {
+  }
+}
+
+Note that interface IB does not explictly implement interface IA, but it
+does so through IA2.
+
+When casting an instance of a type that implements IB to interface IA, the
+following error is reported at runtime :
+
+no implementation for interface method .IA::methodA() in class .C
+METHOD .ctor()
+METHOD methodA()
+METHOD methodA2()
+METHOD methodB()
+
+** ERROR **: file class.c: line 1104 (mono_class_setup_vtable): should not
+be reached
+aborting...
+make: *** [run] Killed
+
+I've attached a repro for this issue.
+
+Just extract the (gzipped) tar and use either the makefile or the NAnt
+build file to reproduce the issue.