Closed
Description
In the Core runtime, a FieldAccessException
is thrown.
Found by newly added tests in #97784
Repro
FieldInfo fieldInfo = typeof(MyStruct).GetField(nameof(MyStruct.fcnPtr));
fieldInfo.SetValue(new MyStruct(), (IntPtr)200);
// Result: assert or does nothing
public struct MyStruct
{
public unsafe delegate*<void> fcnPtr = (delegate*<void>)44;
public MyStruct() { }
}
Asserts include
type 0x1b not handled in ves_icall_FieldInfo_SetValueInternal
type 0x1b not handled in mono_field_get_value_object