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

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Tue Dec 16 01:55:17 CET 2014


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20141216/537e69c8/attachment.htm>


More information about the erlang-bugs mailing list