zzzprojects / Eval-Expression.NET

C# Eval Expression | Evaluate, Compile, and Execute C# code and expression at runtime.
https://eval-expression.net/
Other
456 stars 86 forks source link

version 6.2.0: No applicable member has been found #162

Open cuiliang opened 3 days ago

cuiliang commented 3 days ago

This code will have problem:

var last = JArray.Parse("[]");
  last.Add("aaa");

Error: Oops! No applicable member has been found for the expression. The error occurred for expression "." at position 38 near ".Add(\"aaa\");".

Replace var with type name works.

JArray last = JArray.Parse("[]");
  last.Add("aaa");
JonathanMagnan commented 2 days ago

Hello @cuiliang ,

Thank you for reporting; we successfully reproduced the issue.

We will look at it.

Best Regards,

Jon