[erlang-bugs] Dialyzer can't compile map correctly

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Tue Dec 16 09:28:49 CET 2014


Answering my own mail here, because Anthony Ramine had the correct answer:
erlang:nif_error/1 gets special treatment in the dialyzer and avoids this
problem. I'll reflect that in my code.

The other problem is that the OTP can't reproduce the error on a fresh 17.4
install. Is it possible for someone to test it. It may be my installation
that is broken beyond repair.

On Tue, Dec 16, 2014 at 1:55 AM, Jesper Louis Andersen <
jesper.louis.andersen@REDACTED> wrote:
>
>
> On Tue, Dec 16, 2014 at 1:46 AM, Kostis Sagonas <kostis@REDACTED> wrote:
>
> I indeed see as to why this is true:
>
> Thus, the -spec box_keypair() -> #{ atom() => binary() }. that you have
>> specified is wrong as far as Dialyzer is concerned.
>
>
> But how do you propose I fix this problem then? not_loaded() will *never*
> be called in a real program since it will be replaced by the NIFs C code. I
> want that code to crash and burn if it is ever called, because it means the
> NIF is not loaded properly. That is, what is the correct specification to
> give here such that the underlying call to enacl_nif:crypto_box_keypair()
> returns the right type, without getting the dialyzer all confused due to
> the replacement code in the erlang module?
>
>
> --
> J.
>


-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20141216/9d307e6f/attachment.htm>


More information about the erlang-bugs mailing list