Bugzilla – Bug 319600
[GMCS] IsGenericMethodDefinition always false for InternalCalls
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by malekith@pld-linux.org 2005-11-21 07:17:29 MST ---- 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 ---- Additional Comments From malekith@pld-linux.org 2005-11-21 10:56:56 MST ---- Martin seem to have just fixed that in r53305. I'm not sure I'm allowed to close it :) ---- Additional Comments From lupus@ximian.com 2005-11-22 04:58:23 MST ---- Please don't close this bug: Martin's fix in svn is broken. ---- Additional Comments From martin@ximian.com 2005-12-07 07:35:52 MST ---- Closing the bug. Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>amd64 pld linux</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".