25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Fix creation of type spec for map() options

This commit is contained in:
Evgeny Khramtsov 2019-06-20 19:09:36 +03:00
parent c318b5f8a2
commit 27a1771deb

View File

@ -417,7 +417,7 @@ spec(options, A, [Form|OForm], Mod) when A == 1; A == 2 ->
end, {erl_types:t_none(), erl_types:t_none()}, Fs),
case options_return_type(OForm) of
map ->
erl_types:t_map(lists:flatten(Els), DefK, DefV);
erl_types:t_map(lists:keysort(1, lists:flatten(Els)), DefK, DefV);
dict ->
t_remote(dict, dict);
_ ->