# Inferred type of \`pmap\`

**URL:** <https://discourse.julialang.org/t/inferred-type-of-pmap/75930>\
**Category:** General Usage\
**Tags:** distributed\
**Created:** [February 7, 2022, 3:35am UTC](https://discourse.julialang.org/t/inferred-type-of-pmap/75930 "2022-02-07T03:35:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tictaccat](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@tictaccat](https://discourse.julialang.org/u/tictaccat)\
**Post date:** [February 7, 2022, 3:35am UTC](https://discourse.julialang.org/t/inferred-type-of-pmap/75930/1 "2022-02-07T03:35:57Z")

</div>

When applying `pmap`, it seems like type inference breaks down, as shown below:

```julia
julia> using Distributed
julia> f(x) = pmap(val -> val^2, [x])
f (generic function with 1 method)

julia> @code_warntype f(2)
Variables
  #self#::Core.Const(f)
  x::Int64
  #5::var"#5#6"

Body::Any
1 ─ (#5 = %new(Main.:(var"#5#6")))
│ %2 = #5::Core.Const(var"#5#6"())
│ %3 = Base.vect(x)::Vector{Int64}
│ %4 = Main.pmap(%2, %3)::Any
└── return %4

```

I’m running into this issue because I’m trying to make a contribution to a package, and the contribution uses remote calls, so the tests are complaining that the inferred type (`Any`) is different from the returned type. How can I deal with this problem? Thank you!
