aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2016-02-19 08:37:51 +0100
committerHans Bolinder <[email protected]>2016-02-19 08:37:51 +0100
commit48411ad12f4d730412895e90c188c2d8f7813ce5 (patch)
tree73ce5d153d7c1e4996756c6874191bdda5ac81a9
parent2fc3f4c31ee71174ccf3478553a236a486e542c0 (diff)
parent47fae67ce44af1d6e65f59061bff9d799e8f86f5 (diff)
downloadotp-48411ad12f4d730412895e90c188c2d8f7813ce5.tar.gz
otp-48411ad12f4d730412895e90c188c2d8f7813ce5.tar.bz2
otp-48411ad12f4d730412895e90c188c2d8f7813ce5.zip
Merge branch 'hb/stdlib/epp_typed_record_fields/OTP-13148'
* hb/stdlib/epp_typed_record_fields/OTP-13148: stdlib: Let beam_lib restore typed record forms
-rw-r--r--lib/stdlib/src/beam_lib.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/stdlib/src/beam_lib.erl b/lib/stdlib/src/beam_lib.erl
index 00cd1221fa..7a17226e46 100644
--- a/lib/stdlib/src/beam_lib.erl
+++ b/lib/stdlib/src/beam_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2016. 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.
@@ -904,7 +904,11 @@ anno_from_term({Tag, Forms}) when Tag =:= abstract_v1; Tag =:= abstract_v2 ->
anno_from_term(T) ->
T.
-anno_from_forms(Forms) ->
+anno_from_forms(Forms0) ->
+ %% Forms with record field types created before OTP 19.0 are
+ %% replaced by well-formed record forms holding the type
+ %% information.
+ Forms = epp:restore_typed_record_fields(Forms0),
[erl_parse:anno_from_term(Form) || Form <- Forms].
start_crypto() ->