Bugzilla – Bug 317987
[GMCS] Runtime issue with `params T[][]'
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by dsilva@ccs.neu.edu 2005-05-14 06:05:17 MST ---- Description of Problem: gmcs isn't emitting the appendArrays<int> method here: public class App { public static void Main() { FP.appendArrays(new int[] {1, 2}, new int[] {3, 4}); } } class FP { public static T[] appendArrays<T>(params T[][] arrays) { int length = 0; foreach (T[] array in arrays) length += array.Length; T[] result = new T[length]; int k = 0; foreach (T[] array in arrays) foreach (T obj in array) { result[k] = obj; k++; } return result; } } $ gmcs -g arr.cs $ mono --debug arr.exe ** (arr.exe:6289): WARNING **: Missing method appendArrays in assembly /tmp/arr.exe, type FP Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object ---- Additional Comments From martin@ximian.com 2005-05-17 10:29:43 MST ---- Very funny summary ;-) ---- Additional Comments From martin@ximian.com 2005-05-17 10:35:04 MST ---- I think we first have to fix #74953. ---- Additional Comments From martin@ximian.com 2005-07-06 14:04:05 MST ---- Fixed in SVN; added gtest-185.cs. This bug depended on bug(s) 74953. Unknown operating system unknown. Setting to default OS "Other".