aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorHans Bolinder <hasse@erlang.org>2010-03-02 07:08:31 +0000
committerErlang/OTP <otp@erlang.org>2010-03-02 07:08:31 +0000
commit72fbfd173f2f60bb1b12f826adf41ad9f8fa255e (patch)
tree1ee9982d0164d16187b45f5b6541e8679c366739 /lib/stdlib/src
parentbd9f45d47b8997c9752f66342a5c00ec5d43fe63 (diff)
downloadotp-72fbfd173f2f60bb1b12f826adf41ad9f8fa255e.tar.gz
otp-72fbfd173f2f60bb1b12f826adf41ad9f8fa255e.tar.bz2
otp-72fbfd173f2f60bb1b12f826adf41ad9f8fa255e.zip
OTP-8473 stdlib: erl_pp bugfix abstract type 'fun'
The abstract type 'fun' could not be printed. This bug has been fixed.
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/erl_pp.erl14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/stdlib/src/erl_pp.erl b/lib/stdlib/src/erl_pp.erl
index b1b5bad294..93c2541e80 100644
--- a/lib/stdlib/src/erl_pp.erl
+++ b/lib/stdlib/src/erl_pp.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(erl_pp).
@@ -161,7 +161,9 @@ ltype({type,_Line,binary,[I1,I2]}) ->
binary_type(I1, I2); % except binary()
ltype({type,_Line,'fun',[]}) ->
leaf("fun()");
-ltype({type,_Line,'fun',_}=FunType) ->
+ltype({type,_,'fun',[{type,_,any},_]}=FunType) ->
+ [fun_type(['fun',$(], FunType),$)];
+ltype({type,_Line,'fun',[{type,_,product,_},_]}=FunType) ->
[fun_type(['fun',$(], FunType),$)];
ltype({type,Line,T,Ts}) ->
simple_type({atom,Line,T}, Ts);