[Mono-bugs] [Bug 80455][Nor] New - Reflection does not allow external generic method

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jan 4 21:41:08 EST 2007


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 miguel at ximian.com.

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

--- shadow/80455	2007-01-04 21:41:08.000000000 -0500
+++ shadow/80455.tmp.5490	2007-01-04 21:41:08.000000000 -0500
@@ -0,0 +1,45 @@
+Bug#: 80455
+Product: Mono: Runtime
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: miguel at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Reflection does not allow external generic method 
+
+The following crashes gmcs:
+
+mono$ gmcs /tmp/a.cs
+/tmp/a.cs(6,22): warning CS0169: The private method `A.Do<T>()' is never used
+In type: A
+
+Unhandled Exception: System.InvalidOperationException: Method 'A.Do' does
+not have a method body.
+  at System.Reflection.Emit.MethodBuilder.fixup () [0x00000]
+  at System.Reflection.Emit.TypeBuilder.CreateType () [0x00000]
+  at Mono.CSharp.TypeContainer.CloseType () [0x00000]
+mono$ gmcs /tmp/a.cs
+/tmp/a.cs(6,22): warning CS0169: The private method `A.Do()' is never used
+Compilation succeeded - 1 warning(s)
+mono$ cat /tmp/a.cs
+using System;
+using System.Runtime.InteropServices;
+
+class A {
+        [DllImport ("Dingus")]
+                extern static void Do<T> ();
+
+        static void Main ()
+        {
+
+        }
+}


More information about the mono-bugs mailing list