Closed cesaryuan closed 3 years ago
Hello @cesaryuan ,
Thank you for reporting,
We indeed can reproduce this issue with your code. We will look at it.
Best Regards,
Jon
Hello @cesaryuan ,
The v4.0.51 has been released.
Could you test it and let us know if we fixed it successfully?
Thank you so much! It has worked!
When I change the statements as follows, another Exception is throwed.
public delegate int Del(params int[] param);
public int sum(params int[] param)
{
return param.Sum();
}
void Main()
{
var context = new EvalContext();
Del fun = new Del(sum);
Console.WriteLine(fun(new[] { 1, 2}));
Console.WriteLine(context.Execute(@"fun(new[] { 1, 2})", new {fun=fun}));
}
Exception:
No coercion operator is defined between types 'System.Int32[]' and 'System.Int32'.
Hello @cesaryuan ,
Unfortunately, that issue is a lot harder on our side to fix as it requires a big revamps to use some existing code about method resolution.
It is possible to know if you have a license for our library? If yes, could you sent your license name to confirm it at: info@zzzprojects.com
If you have paid for the support, we will try to give this issue another shot.
Best Regards,
Jon
Hello @cesaryuan ,
We got an email confirming it.
I cannot promise anything yet since that one is more complex but we will look at it again and try to support this case.
Best Regards,
Jon
Hello @cesaryuan ,
We got an email confirming it.
I cannot promise anything yet since that one is more complex but we will look at it again and try to support this case.
Best Regards,
Jon
Thank you for your effort!
Hello @cesaryuan ,
The v4.0.53 has been released.
We did a quick fix as we didn't succeed to plug the resolution we normally use for methods. So we might still have some improvement to do here but it should now work with your case without a problem.
Best Regards,
Jon
The Program below throws an error, but it shouldn't.
Error Message throwed