aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-06-11 15:17:25 +0200
committerHans Bolinder <[email protected]>2018-06-11 15:17:25 +0200
commit0e9d90f6925fe6b4284908638fefe0e1f4e2419c (patch)
tree780b5b55bd4955a71a083d013c4c9ec93a348d25
parenta221bb53d41de10f5fcf3d5d6c0174af702c3cce (diff)
parent705ff39a8052b433c2f2dede775cb068aca620d6 (diff)
downloadotp-0e9d90f6925fe6b4284908638fefe0e1f4e2419c.tar.gz
otp-0e9d90f6925fe6b4284908638fefe0e1f4e2419c.tar.bz2
otp-0e9d90f6925fe6b4284908638fefe0e1f4e2419c.zip
Merge branch 'hasse/edoc/fix_map_type_layout/OTP-15117'
* hasse/edoc/fix_map_type_layout/OTP-15117: edoc, erl_docgen: Fix pretty-printing of type map()
-rw-r--r--lib/edoc/src/edoc_layout.erl2
-rw-r--r--lib/erl_docgen/src/docgen_otp_specs.erl4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/edoc/src/edoc_layout.erl b/lib/edoc/src/edoc_layout.erl
index baa147410b..47ff7b21fc 100644
--- a/lib/edoc/src/edoc_layout.erl
+++ b/lib/edoc/src/edoc_layout.erl
@@ -1193,6 +1193,8 @@ ot_name(Es, T) ->
{atom,0,list_to_atom(Atom)},T]};
"tuple" when T =:= [] ->
{type,0,tuple,any};
+ "map" when T =:= [] ->
+ {type,0,map,any};
Atom ->
{type,0,list_to_atom(Atom),T}
end.
diff --git a/lib/erl_docgen/src/docgen_otp_specs.erl b/lib/erl_docgen/src/docgen_otp_specs.erl
index 9f2b401f93..311ec1471a 100644
--- a/lib/erl_docgen/src/docgen_otp_specs.erl
+++ b/lib/erl_docgen/src/docgen_otp_specs.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2017. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2018. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -658,6 +658,8 @@ ot_name(Es, T) ->
{atom,0,list_to_atom(Atom)},T]};
"tuple" when T =:= [] ->
{type,0,tuple,any};
+ "map" when T =:= [] ->
+ {type,0,map,any};
Atom ->
{type,0,list_to_atom(Atom),T}
end.