We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stripped down to a relatively minimal block to show the issue.
error: Oops! No applicable member has been found for the expression. The error occurred for expression "?." at position 59 near "?.ToString(\"g\");
Oops! No applicable member has been found for the expression. The error occurred for expression "?." at position 59 near "?.ToString(\"g\");
const string mutationScript = """ // throws exception dict["CreatedOn"] = ((DateTime?)dict["CreatedOn"])?.ToString("g"); // works // dict["CreatedOn"] = dict["CreatedOn"]?.ToString("g"); """; var dicts = new[] { new Dictionary<string, object>() { { "CreatedOn", DateTime.Now } }, new Dictionary<string, object>() { { "CreatedOn", null } } }; var evalContext = new EvalContext { SafeMode = true }; evalContext.UnregisterAll(); evalContext.RegisterDefaultAliasSafe(); evalContext.RegisterType( typeof(IDictionary<string, object>), typeof(string), typeof(DateTime?) ); var compiled = evalContext.Compile<Action<IDictionary<string, object>>>( mutationScript, "dict" ); foreach(var dict in dicts) { compiled(dict); }
The text was updated successfully, but these errors were encountered:
Hello @mrtristan ,
Thank you for reporting; I can confirm I successfully reproduced this issue with your code, so we will look at it.
Best Regards,
Jon
Sorry, something went wrong.
The v6.1.4 has been released.
Could you let us know if my developer fixed the issue correctly?
JonathanMagnan
No branches or pull requests
stripped down to a relatively minimal block to show the issue.
error:
Oops! No applicable member has been found for the expression. The error occurred for expression "?." at position 59 near "?.ToString(\"g\");
The text was updated successfully, but these errors were encountered: