Re: Dialyzer can't compile map correctly

Jesper Louis Andersen <[email protected]>
Newsgroups gmane.comp.lang.erlang.bugs
Message-ID <CAGrdgiXvonhyH+D5jvx2SrY76t7JMrBWzWeQz2jsy2_okE8hpA@mail.gmail.com>
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 <
[email protected]> wrote:
>
>
> On Tue, Dec 16, 2014 at 1:46 AM, Kostis Sagonas <[email protected]> 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.

_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.