[Mono-bugs] [Bug 36545][Nor] Changed - Embedding: The runtime should fail more gracefully

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 10 Jan 2003 23:13:15 -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 gonzalo@ximian.com.

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

--- shadow/36545	Fri Jan 10 12:56:25 2003
+++ shadow/36545.tmp.19191	Fri Jan 10 23:13:15 2003
@@ -11,13 +11,13 @@
 AssignedTo: lupus@ximian.com                            
 ReportedBy: alp@atoker.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: Embedding: Invoking a constructor fails
+Summary: Embedding: The runtime should fail more gracefully
 
 Attempting to invoke the .ctor method of a class using mono_runtime_invoke
 fails. In the provided test case, invoking a static method in the class
 works, but invoking the constructor does not:
 
 $ mcs --target library Test.cs
@@ -115,6 +115,19 @@
 	}
 }
 
 
 ------- Additional Comments From duncan@ximian.com  2003-01-10 12:56 -------
 Weird, I updated my runtime and it's good now.
+
+------- Additional Comments From gonzalo@ximian.com  2003-01-10 23:13 -------
+You gotta do:
+
+a) declare MonoObject *obj;
+b)   obj = mono_object_new (domain, test_class);
+  mono_runtime_invoke (meth, obj, 0, 0);
+
+and it works.
+
+Ie, as .ctor is an instance method, you gotta have an object.
+
+The runtime should fail more gracefully...