On Wed, Feb 20, 2019 at 09:57:19AM +1300, David Rowley wrote:
> Great. Thanks for reviewing it.
You forgot to change a call of LookupFuncWithArgs() in
CreateTransform().
- address.objectId = LookupFuncWithArgs(objtype, castNode(ObjectWithArgs, object), missing_ok);
+ address.objectId = LookupFuncWithArgs(objtype, castNode(ObjectWithArgs, object),
+ missing_ok ? FUNCLOOKUP_ERRIFAMBIGUOUS :
+ FUNCLOOKUP_NORMAL);
LookupFuncWithArgs() calls itself LookupFuncName(), which may not use
the check type provided by the caller.. I think that the existing API
is already confusing enough, and this patch makes it a bit more
confusing by adding an extra error layer handling on top of it.
Wouldn't it be more simple from an error handling point of view to
move all the error handling into LookupFuncName() and let the caller
decide what kind of function type handling it expects from the start?
I think that the right call is to add the object type into the
arguments of LookupFuncName().
--
Michael