expr icon indicating copy to clipboard operation
expr copied to clipboard

feat: Operator overload from Function

Open nikolaymatrosov opened this issue 2 years ago • 1 comments

Closes #362

nikolaymatrosov avatar Aug 17 '23 11:08 nikolaymatrosov

I have entirely rewritten the PR. I do not no more mix Functions and Types. Instead, when the operator looks for a suitable overload, it first checks the Functions and then Types. So now it is possible to override the method defined in the Env with the function with the same signature. There is a test for this behavior.

Unfortunately, I can not figure out how to make work Function with the same name as Type but a different signature. I still don't know if it is a valid scenario, so I pushed my solution, missing this piece.

nikolaymatrosov avatar Aug 23 '23 15:08 nikolaymatrosov

Ok, looks good. Please rebase.

antonmedv avatar Feb 11 '24 21:02 antonmedv

In recent versions, this issue does not seem to have been solved, and it is very important for rewriting operations with functions

Q16G avatar Feb 16 '24 06:02 Q16G

Will take a look.

antonmedv avatar Feb 16 '24 14:02 antonmedv

I have rebased on the latest master.

nikolaymatrosov avatar Feb 17 '24 12:02 nikolaymatrosov