[Mono-bugs] [Bug 29807][Nor] Changed - Delegate.CreateDelegate(Type,Type,string) does not work

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
3 Sep 2002 19:27:41 -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 ric@users.sourceforge.net.


--- shadow/29807	Tue Sep  3 11:31:22 2002
+++ shadow/29807.tmp.30314	Tue Sep  3 15:27:41 2002
@@ -1,15 +1,15 @@
 Bug#: 29807
 Product: Mono/Runtime
 Version: unspecified
 OS: other
 OS Details: 
-Status: RESOLVED   
-Resolution: FIXED
+Status: REOPENED   
 Severity: Unknown
-Priority: Wishlist
+Priority: Normal
 Component: misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: ric@users.sourceforge.net               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -46,6 +46,29 @@
 in <0x00125> 00 System.Delegate:CreateDelegate (System.Type,System.Type,string)
 in <0x0007c> 00 T1.T:Main (string[])
 ------- Additional Comments From manyoso@yahoo.com  2002-09-03 11:31 -------
 I think this is fixed. Please verify :-) 
+------- Additional Comments From ric@users.sourceforge.net  2002-09-03 15:27 -------
+Sorry, but I think that this is not fixed. With last CVS (which has
+the last changes to Delegate.cs from Adam Treat) I get the same
+result. So unless the anonymous cvs is fooling me, I have to reopen
+the bug.
+Looking at the code in icall.c that implements this (function
+ves_icall_System_Delegate_CreateDelegate_internal), I think that
+actually this can't work:
+In line 2205 it is dereferencing the "target" object. But we are
+asking for a static method, so target is null:
+delegate = mono_object_new (target->vtable->domain, delegate_class);
+in Delegate.cs, line 116, the call looks like:
+return CreateDelegate_internal (type, null, info);
+which I think is the right thing to do (although I don't fully
+understand those methods after the last changes... it seems I need to
+learn more about .Net)