Description
In 1.4.20 I started having an issue with member methods not being found, specifically on DateTime and DateTimeOffset. Some digging and it looks like the parameter filter are causing some of the basic methods like AddDays(double d)
to be excluded when the given parameter is in fact an int.
var evaluator = new ExpressionEvaluator();
evaluator.Evaluate("DateTime.Now.AddDays(1)");
This will yield an exception, CodingSeb.ExpressionEvaluator.ExpressionEvaluatorSyntaxErrorException: [System.DateTime] object has no Method named "AddDays".]
Specifying the variable as a double fixes the issue, evaluator.Evaluate("DateTime.Now.AddDays(1d)");
but this isn't always ideal or obvious as int is implicitly convertable to double and passing an int to AddDays
is valid C#.
I see in the commits that this section of code is being worked on - is this something I should try to fix and send in a pull request? Or hold off till next release, or let the maintainers handle?