aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/erl_pp.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-04-09 09:28:46 +0200
committerHans Bolinder <[email protected]>2014-04-29 09:16:53 +0200
commit7ad783d431738c42fa9ce395fbc776916d927eb6 (patch)
tree065069662aa6a42d69596db105af0cc760b74cea /lib/stdlib/src/erl_pp.erl
parent847e7291b2800ebd7e188be6e88114fb1e8900ce (diff)
downloadotp-7ad783d431738c42fa9ce395fbc776916d927eb6.tar.gz
otp-7ad783d431738c42fa9ce395fbc776916d927eb6.tar.bz2
otp-7ad783d431738c42fa9ce395fbc776916d927eb6.zip
Allow more type names
product/_, union/_, range/2 as well as tuple/N (N > 0), map/N (N > 0), atom/1, integer/1, binary/2, record/_, and 'fun'/_ can now be used as type names.
Diffstat (limited to 'lib/stdlib/src/erl_pp.erl')
-rw-r--r--lib/stdlib/src/erl_pp.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stdlib/src/erl_pp.erl b/lib/stdlib/src/erl_pp.erl
index 788dbb40b6..8337ecc4dd 100644
--- a/lib/stdlib/src/erl_pp.erl
+++ b/lib/stdlib/src/erl_pp.erl
@@ -285,6 +285,9 @@ ltype({type,_,'fun',[{type,_,any},_]}=FunType) ->
ltype({type,_Line,'fun',[{type,_,product,_},_]}=FunType) ->
[fun_type(['fun',$(], FunType),$)];
ltype({type,Line,T,Ts}) ->
+ %% Compatibility. Before 18.0.
+ simple_type({atom,Line,T}, Ts);
+ltype({user_type,Line,T,Ts}) ->
simple_type({atom,Line,T}, Ts);
ltype({remote_type,Line,[M,F,Ts]}) ->
simple_type({remote,Line,M,F}, Ts);