]> granicus.if.org Git - ejabberd/commitdiff
Fix creation of type spec for map() options
authorEvgeny Khramtsov <ekhramtsov@process-one.net>
Thu, 20 Jun 2019 16:09:36 +0000 (19:09 +0300)
committerEvgeny Khramtsov <ekhramtsov@process-one.net>
Thu, 20 Jun 2019 16:09:36 +0000 (19:09 +0300)
tools/opt_types.sh

index 516def304a798a4ebcd96c138752624514078c73..a8e12bb609638358cb6ec9f21a80f3a7fb520d0f 100755 (executable)
@@ -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);
                _ ->