[erlang-questions] possible dialyzer bug

Brujo Benavides <>
Mon Jan 25 15:14:26 CET 2016


Zach:

	Dialyzer is basically telling you that, with the parameters you’re using MapId, UserId, ClientId, Terms), the function convert_map_to_record/4 can never return {ok, _}.
	Without the code preceding the function call and the code for convert_map_to_record/4, it’ll be hard to tell you exactly what’s going on.
	Cheers!

> On Jan 25, 2016, at 11:09, Zachary Kessin <> wrote:
> 
> I have a strange dialyzer problem, I have this code
> 
>                   case convert_map_to_record(MapId, UserId, ClientId, Terms) of
>                       {ok, MapRecord} ->
>                           %....
>                           {true, ReqData1, MapRecord};
>                       {error, Error} ->
>                           lager:error("Error ~p", [Error]),
>                           {{error, 405}, ReqData, State}
>                   end
> 
> and dialyzer is saying this
> 
> _build/default/lib/frontend/src/wm_map.erl
>  100: The pattern {'ok', MapRecord} can never match the type {'error',_}
> 
> With what is line 100 being the line with the red background, what is strange is that that the error case is covered in the case statement
> 
> Zach
> -- 
> Zach Kessin
> Your CRM Link <http://yourcrm.link/?utm_source=email%20signature&utm_medium=email&utm_campaign=passive>
> Twitter: @zkessin <https://twitter.com/zkessin>
> Skype: zachkessin
>> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160125/be3aa312/attachment.html>


More information about the erlang-questions mailing list