Need to upcast on function type inference.