My attempt to take a stab at the TODO in the code:
// TODO: define up-converting matchers.
We've got here since we noticed that functions that have list<any1>, any1 arguments wouldn't match list<string>, string without implementing a proper CallConverter as adapter:
The FunctionConverter was not matching using directMatchKey since list_any != list_str.
When falling back to the leastRestrictive logic, list<string> + string would also not agree, so no functions were returned.
I've kept the leastRestrictive logic intact, but added another fallback matcher that checks if all arguments will match (using the existent isMatch logic, which relies on IgnoreNullableAndParameters internally).
--
Let me know if there are any concerns or thoughts on how to make this better.
My attempt to take a stab at the
TODO
in the code:We've got here since we noticed that functions that have
list<any1>, any1
arguments wouldn't matchlist<string>, string
without implementing a properCallConverter
as adapter:The
FunctionConverter
was not matching usingdirectMatchKey
sincelist_any
!=list_str
.When falling back to the
leastRestrictive
logic,list<string>
+string
would also not agree, so no functions were returned.I've kept the
leastRestrictive
logic intact, but added another fallback matcher that checks if all arguments will match (using the existentisMatch
logic, which relies on IgnoreNullableAndParameters internally).--
Let me know if there are any concerns or thoughts on how to make this better.