Implement name resolution for generic functions