[Mono-bugs] [Bug 79367][Maj] New - DynamicMethod ctor not following MSDN

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Sep 11 17:01:55 EDT 2006


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 roosmaa at gmail.com.

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

--- shadow/79367	2006-09-11 17:01:55.000000000 -0400
+++ shadow/79367.tmp.2397	2006-09-11 17:01:55.000000000 -0400
@@ -0,0 +1,43 @@
+Bug#: 79367
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: Ubuntu Dapper, Mono SVN HEAD
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: roosmaa at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: DynamicMethod ctor not following MSDN
+
+System.Reflection.Emit.DynamicMethod ctor (String, MethodAttributes,
+CallingConventions, Type, Type[], Module, Boolean) has been written so,
+that it differs from what MSDN has.
+
+name - Can be a zero-length string, but in Mono it is forbidden.
+returnType - ".., or a null reference if the method has no return type."
+Forbidden again in Mono.
+
+I came across it when trying to use NHibernate (1.2.0.Alpha1, the .Net 2.0
+version) - just a basic setup will result in an exception.
+
+When "correcting" the previous problem by removing the false checks, I got
+the following:
+
+Unhandled Exception: System.ArgumentException: method return type is
+incompatible
+  at System.Delegate.CreateDelegate (System.Type type,
+System.Reflection.MethodInfo method) [0x00000] 
+  at System.Reflection.Emit.DynamicMethod.CreateDelegate (System.Type
+delegateType) [0x00000]
+...
+
+And as I don't really know the processes taking place there, I figured,
+that Mono would be better off if someone who knew what s/he was doing would
+fix that.


More information about the mono-bugs mailing list