Bugzilla – Bug 315152
Field initializer of multidimentional arrays not always run
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by rshade@dvsconsulting.com 2004-06-17 02:24:12 MST ---- Multidimentional arrays are not being initialized when initialized with: class T { int[,] i = new int[1,1]; ... } a reference to i[0,0] results in a NullReferenceException. However, this works: class T { int[,] i2 = new int[,] { {0} } ... } ---- Additional Comments From rshade@dvsconsulting.com 2004-06-17 02:25:28 MST ---- Created an attachment (id=166269) Testcase ---- Additional Comments From rshade@dvsconsulting.com 2004-06-17 02:28:41 MST ---- It seems to run ok in the interpreter, so this might be a PPC specific issue with the JIT. I don't have an x86 machine around to test, though. ---- Additional Comments From miguel@ximian.com 2004-06-17 10:35:55 MST ---- This works fine on x86. It does indeed fail on PPC. ---- Additional Comments From lupus@ximian.com 2004-06-18 12:34:18 MST ---- Cvs handles this case now, but to better fix all the architectures https://bugzilla.novell.com/show_bug.cgi?id=MONO59509 needs to be fixed. Thanks for the test case. *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO59509 *** Imported an attachment (id=166269) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>OS 10.3</cf_op_sys_details> This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"