sklose/NCalc2

if function with int and double parameters

deltex80 opened this issue · 0 comments

When using the if function in compiled mode I get the error:
'cannot be evaluated due this error: Argument types do not match'
with expressions like
if(true, 1, 0.0)
While in interpreted mode this is evaluated correctly.
I tried to write an overload of the function in my context object that takes an int and double as parameters but that didn't do the trick.
Is it possible to add support for expressions like this?
Thanks