get type information from generic function type in function invocation
emit IR for generic function with some workaround for builtin functions