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
1 changed files with 1 additions and 1 deletions

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);
_ ->