[Mono-bugs] [Bug 76780][Blo] New - [GMCS] IsGenericMethodDefinition always false for InternalCalls

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Nov 21 07:17:30 EST 2005


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 malekith at pld-linux.org.

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

--- shadow/76780	2005-11-21 07:17:30.000000000 -0500
+++ shadow/76780.tmp.16291	2005-11-21 07:17:30.000000000 -0500
@@ -0,0 +1,62 @@
+Bug#: 76780
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: amd64 pld linux
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: malekith at pld-linux.org               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] IsGenericMethodDefinition always false for InternalCalls
+
+Description of Problem:
+
+The mono S.R.E. API doesn't account for InternalCalls and PInvoke methods
+that are generic. They are always treated as non-generic, but it seems
+possible to have at least generic internal calls, like the ones introduced
+here:
+http://lists.ximian.com/pipermail/mono-patches/2005-November/067172.html
+
+This makes the Nemerle compiler choke on these.
+
+The following program demonstrates the problem:
+
+#v+
+using System;
+using System.Reflection;
+
+class C {
+  public static void Main ()
+  {
+    MethodInfo ex = null;
+
+    foreach (MethodInfo m in typeof(System.Threading.Interlocked).GetMethods())
+                if (m.Name == "Exchange" && m.IsGenericMethodDefinition)
+                        ex = m;
+
+    Console.WriteLine ("{0} {1} {2}", ex, ex.IsGenericMethodDefinition,
+ex.GetType());
+        foreach (Type t in ex.GetGenericArguments ())
+      Console.WriteLine ("  {0}", t);
+  }
+}
+#v-
+
+Actual Results:
+null ref exception
+
+Expected Results:
+list of type parameters
+
+How often does this happen? 
+always
+
+Additional Information:
+mono svn trunk


More information about the mono-bugs mailing list