[Mono-bugs] [Bug 36150][Wis] New - Mono fails to invoke method calls on objects implementing interfaces

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
29 Dec 2002 02:58:23 -0000


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 tum@veridicus.com.

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

--- shadow/36150	Sat Dec 28 21:58:23 2002
+++ shadow/36150.tmp.24337	Sat Dec 28 21:58:23 2002
@@ -0,0 +1,90 @@
+Bug#: 36150
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: tum@veridicus.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Mono fails to invoke method calls on objects implementing interfaces
+
+Description of Problem:
+
+Mono can't call properly resolve and call interface methods on objects 
+where the actual implementation of the interface is several classes deep 
+in the class hierarchy.  It's difficult to explain in words.  See example 
+code.  I think this should be considered a severe problem since it 
+prohibits the use of code that uses some popular OO design patterns.
+
+Steps to reproduce the problem:
+
+1. Compile the example code.
+2. Run it.
+
+Actual Results:
+
+Foo
+** ERROR **: file jit.c: line 3640 (mono_cfg_new): assertion failed: 
+(((MonoMethodNormal *)method)->header) aborting...
+
+Expected Results:
+
+Foo
+Foo
+
+How often does this happen? 
+
+All the time.
+
+Additional Information:
+
+--START-OF-testmethod.cs--
+using System;
+
+public interface IFooable
+{
+	void Foo();
+}
+
+public abstract class AbstractFooable
+	: IFooable
+{
+	public abstract void Foo();
+}
+
+public class FooableObject
+	: AbstractFooable, IFooable
+{
+	public override void Foo()
+	{
+		Console.WriteLine("Foo");
+	}
+}
+
+public class TestMethod
+{
+	public static void Main()
+	{
+		IFooable fooable;
+		FooableObject fooableObject;
+
+		fooable  = fooableObject = new FooableObject();
+
+		// This works.
+
+		fooable.Foo();
+
+		// This doesn't.
+
+		fooableObject.Foo();
+	}
+}
+--ENDOF-testmethod.cs--