aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/erl_pp.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2011-03-23 09:35:11 +0100
committerHans Bolinder <[email protected]>2011-03-23 09:35:11 +0100
commite243040fabd2701995cc4565250674d972403db2 (patch)
treeda8d5a0aa06f4642de871762ebd5abd8b76d4a84 /lib/stdlib/src/erl_pp.erl
parentf861b4fdb3fd39e35f2951c53a73b30a98c7f973 (diff)
parentb420086b983b934b231323a682e676bf149e7bf8 (diff)
downloadotp-e243040fabd2701995cc4565250674d972403db2.tar.gz
otp-e243040fabd2701995cc4565250674d972403db2.tar.bz2
otp-e243040fabd2701995cc4565250674d972403db2.zip
Merge branch 'hb/record_field_undefined_type/OTP-9147' into dev
* hb/record_field_undefined_type/OTP-9147: Fix a bug concerning record field types
Diffstat (limited to 'lib/stdlib/src/erl_pp.erl')
-rw-r--r--lib/stdlib/src/erl_pp.erl10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/stdlib/src/erl_pp.erl b/lib/stdlib/src/erl_pp.erl
index df4a20b833..66c80a45cb 100644
--- a/lib/stdlib/src/erl_pp.erl
+++ b/lib/stdlib/src/erl_pp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2011. 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
@@ -558,17 +558,11 @@ record_field({typed_record_field,{record_field,_,F,Val},Type}, Hook) ->
Fl = lexpr(F, L, Hook),
Vl = typed(lexpr(Val, R, Hook), Type),
{list,[{cstep,[Fl,' ='],Vl}]};
-record_field({typed_record_field,Field,Type0}, Hook) ->
- Type = remove_undefined(Type0),
+record_field({typed_record_field,Field,Type}, Hook) ->
typed(record_field(Field, Hook), Type);
record_field({record_field,_,F}, Hook) ->
lexpr(F, 0, Hook).
-remove_undefined({type,L,union,[{atom,_,undefined}|T]}) ->
- {type,L,union,T};
-remove_undefined(T) -> % cannot happen
- T.
-
list({cons,_,H,T}, Es, Hook) ->
list(T, [H|Es], Hook);
list({nil,_}, Es, Hook) ->