Replies: 1 comment 2 replies
-
This should be fixed |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have defined all my custom functions using expr.Function and added them as options during the compile step. This works nicely and my functions are then usable in expressions.
I would now like to overload some operators (e.g. "+", "-") to work on custom types. I followed the instructions for adding an Operator option. The custom function that does the adding is called "_add" and I have defined it using
expr.Function
just like all my custom functions.Unfortunately this does not work, compile fails with:
I debugged into expr and this seems to be because the function "_add" does not exists in the
Types
map. It seems that only functions that exist in the env are added to this map, functions that are defined usingexpr.Function
are not.Is there a reason why operator overloading does not work with functions defined using
expr.Function
?Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions