[Mono-bugs] [Bug 53145][Nor] New - Excplicit method override failure

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 20 Jan 2004 16:12:48 -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 lupus@ximian.com.

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

--- shadow/53145	2004-01-20 16:12:48.000000000 -0500
+++ shadow/53145.tmp.25099	2004-01-20 16:12:48.000000000 -0500
@@ -0,0 +1,91 @@
+Bug#: 53145
+Product: Mono/Runtime
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lupus@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Excplicit method override failure
+
+Implementing an interface method using an explicit override (with a method
+with a different name) triggers an assert:
+** ERROR **: file class.c: line 827 (mono_class_setup_vtable): assertion
+failed: (decl->slot != -1)
+aborting...
+
+Sample following:
+.assembly extern mscorlib
+{
+  .ver 1:0:3300:0
+}
+.assembly 'test-iface-override'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+.module 'test-iface-override.exe' // GUID =
+{40C4FD6F-E534-479D-9C63-DB0CFCCE5B59}
+
+
+  .class interface private auto ansi abstract 'I'
+  {
+
+    // method line 1
+    .method public virtual  hidebysig  newslot  abstract 
+           instance default void 'method' ()  cil managed 
+    {
+        // Method begins at RVA 0x0
+    } // end of method I::instance default void 'method' () 
+
+  } // end of type I
+
+  .class private auto ansi beforefieldinit 'T'
+  	extends [mscorlib]System.Object
+  	implements I  {
+
+    // method line 2
+    .method public hidebysig  specialname  rtspecialname 
+           instance default void .ctor ()  cil managed 
+    {
+        // Method begins at RVA 0x20ec
+	// Code size 7 (0x7)
+	.maxstack 8
+	IL_0000:  ldarg.0 
+	IL_0001:  call instance void valuetype [mscorlib]'System.Object'::.ctor()
+	IL_0006:  ret 
+    } // end of method T::instance default void .ctor () 
+
+    // method line 3
+    .method public virtual  hidebysig  newslot 
+           instance default void 'method_with_diff_name' ()  cil managed 
+    {
+        // Method begins at RVA 0x20f4
+	// Code size 1 (0x1)
+    	.override I::'method'
+	.maxstack 8
+	IL_0000:  ret 
+    } // end of method T::instance default void 'method' () 
+
+    // method line 4
+    .method private static 
+           default void 'Main' ()  cil managed 
+    {
+        // Method begins at RVA 0x20f6
+	.entrypoint
+	// Code size 1 (0x1)
+	.maxstack 8
+	newobj void T::.ctor()
+	callvirt instance void I::'method'()
+	IL_0000:  ret 
+    } // end of method T::default void 'Main' () 
+
+  } // end of type T