improve type inference of f(size(A)...)