I've attempted to create a small application that uses a delegate to call a static function.
Here is the minimal code to reproduce the issue:
using System;
class Program
{
public static void Main()
{
SomeHandler handler = new SomeHandler(Stuff);
handler.Invoke();
}
private static void Stuff()
{
Console.WriteLine("stuff");
}
public delegate void SomeHandler();
}
When compiling with the '--stdlib:zero' flag this results in the following exception for me:
System.InvalidOperationException: Expected field 'm_extraFunctionPointerOrData' not found on type '[zerolib]System.Delegate'
The problem seems to be that there is a missmatch in the naming in the "m_extraFunctionPointerOrData" field. In the zerolib this field is called "_extraFunctionPointerOrData".
I would have attempted to submit a PR with the change but i did not yet have the time to setup my machine to build bflat locally.
I've attempted to create a small application that uses a delegate to call a static function. Here is the minimal code to reproduce the issue:
When compiling with the '--stdlib:zero' flag this results in the following exception for me:
System.InvalidOperationException: Expected field 'm_extraFunctionPointerOrData' not found on type '[zerolib]System.Delegate'
The problem seems to be that there is a missmatch in the naming in the "m_extraFunctionPointerOrData" field. In the zerolib this field is called "_extraFunctionPointerOrData".I would have attempted to submit a PR with the change but i did not yet have the time to setup my machine to build bflat locally.