Decrypting Dialyzer error message: "The function call will not succeed."

The function call will not succeed.

Map.get(
  _record ::
    {:ok,
     %{:__type => _, :data => %{:id => _, :precision => _, :timestamp => _, _ => _}, _ => _}},
  _key :: :decimals
)

will never return since the 1st arguments differ
from the success typing arguments:

(map(), any())

What is this attempting to communicate?

That you’re calling Map.get() but you are passing something other than a Map as the first argument.

2 Likes

Specifically, this part tells you the first argument you are passing:

You can see that it is a tuple in the form {:ok, %{...}}. So you are probably getting an ok-tuple from some previous function and not unwrapping the map from inside it, but instead passing the tuple straight to the Map.get call.

4 Likes