Replies: 2 comments 1 reply
-
Please, provide full example. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Yes, looks like a problem with isTime() function. Fixed and added regression test in 23efe7b Thanks for reporting. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Compilation of quite simple expression raises the following error:
It happens because the binary minus processing has the following check:
https://github.com/antonmedv/expr/blob/2eb6a03aacf9ca8a87685a6f3b1adc3e8473b295/checker/checker.go#L262
And function isTime ends with the following:
https://github.com/antonmedv/expr/blob/2eb6a03aacf9ca8a87685a6f3b1adc3e8473b295/checker/types.go#L101
Changing of
return isAny(t)
toreturn false
solves this problem.BTW Compilation of
(a + -b + c) / d
and(a + c - b) / d
expressions are ok w/o above change.Beta Was this translation helpful? Give feedback.
All reactions