Dialyzer warning when returning a prolist

Stanislav Ledenev s.ledenev@REDACTED
Tue May 18 16:36:33 CEST 2021


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.

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210518/cffa2288/attachment.htm>


More information about the erlang-questions mailing list