From 27a1771deba502de1894d2f7772914fe8eedc3db Mon Sep 17 00:00:00 2001 From: Evgeny Khramtsov Date: Thu, 20 Jun 2019 19:09:36 +0300 Subject: [PATCH] Fix creation of type spec for map() options --- tools/opt_types.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/opt_types.sh b/tools/opt_types.sh index 516def304..a8e12bb60 100755 --- a/tools/opt_types.sh +++ b/tools/opt_types.sh @@ -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); _ ->