Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParseException with ArgsIncompatibleWithDelegate message is throw when multiple functions are registered with the same signature #159

Closed
davideicardi opened this issue Jul 2, 2021 · 0 comments · Fixed by #231
Labels

Comments

@davideicardi
Copy link
Member

davideicardi commented Jul 2, 2021

We should throw instead a ParseException with AmbiguousDelegateInvocation that describe better the use case.

See #157 and #158 .

in FindBestMethod, if there are more than one applicable method, the candidates are filtered by the MethodHasPriority method. If no method has priority (like in this particular case), then FindBestMethod returns an empty array, and therefore the caller can't see that there's in fact an ambiguity

See also this explanation

metoule added a commit to metoule/DynamicExpresso that referenced this issue Mar 7, 2022
metoule added a commit that referenced this issue Mar 9, 2022
* Properly return all the possible overloads if no overload is an exact match.
Fixes #159

* Added a way to remove identifiers from the current interpreter.

* SetFunction now only keeps the latest delegate registered with a given signature (ie. it's no longer possible to register two delegates with the exact same signature).

* Fix broken test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant