https://bugzilla.novell.com/show_bug.cgi?id=372412
User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=372412#c372410 Summary: gmcs don't emit readonly prefix for generic array access. Product: Mono: Compilers Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: C# AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] QAContact: [email protected] Found By: --- When generics code need to do load the address of an array element of generic type it must emit a readonly prefix, otherwise a System.ArrayTypeMismatchException will be raised. For example: T[] t; t[0].GetHashCode(); Must be compiled to: ldc.i4.0 readonly. ldelema !T constrained. !T callvirt instance int32 object::GetHashCode() Right now gmcs don't emit the readonly. prefix. This applies to Array::Address magic methods as well. See #372410 for a test case and the long explanation of why the readonly prefix is required. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
