Re: Dialyzer warning when returning a prolist

Stanislav Ledenev <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <CAOkK=ALnE=7WmmT0woOtxsUhs4iSMS5mEvgXi+jCYxQvb8Zm-Q@mail.gmail.com>
I think all of the special with proplist simply cuts down to the fact that
proplist's types are exported.
If you made your own module with types you'll get same "working" dialyzer.

myprops.erl
--------------
-module(myprops).
-type property() :: atom() | tuple().
-type proplist() :: [property()].

-export_type([proplist/0, property/0]).

test.erl
-----------
-spec test() -> myprops:proplist().

Perhaps it is somehow connected with the "dynamic" nature of exported types
in the eyes of the dialyzer.
Sorry I can't say more than this. I've never dug so deep with the dialyzer.

>
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.