* Update overlapped field test to conflict on 32-bit arches
Fixes https://github.com/dotnet/runtime/issues/62303
* [class-init] Setup fields of nested structs in layout check
On AOT the field's class may not have been fully inited yet.
Related to https://github.com/dotnet/runtime/issues/62311
if (mono_type_is_struct (ftype)) {
// recursively check the layout of the embedded struct
MonoClass *embedded_class = mono_class_from_mono_type_internal (ftype);
- g_assert (m_class_is_fields_inited (embedded_class));
+ mono_class_setup_fields (embedded_class);
const int embedded_fields_count = mono_class_get_field_count (embedded_class);
int *embedded_offsets = g_new0 (int, embedded_fields_count);
[StructLayout(LayoutKind.Explicit)]
public struct ThirdLevel
{
- [FieldOffset(6)]
+ [FieldOffset(2)]
public short ConflictingValueTypeField;
}