aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/shell.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2016-02-17 13:01:46 +0100
committerHans Bolinder <[email protected]>2016-02-17 13:01:46 +0100
commitf524d3baff6f63846efa571851cc3cc4a55916bd (patch)
treefe8a5d13ab678425e40a60117519c6a641a07dfc /lib/stdlib/src/shell.erl
parent05a24fed7539f861c7d725829acb196a3991923c (diff)
parent6285f2874977e033d02b3c0b77da78e35e771961 (diff)
downloadotp-f524d3baff6f63846efa571851cc3cc4a55916bd.tar.gz
otp-f524d3baff6f63846efa571851cc3cc4a55916bd.tar.bz2
otp-f524d3baff6f63846efa571851cc3cc4a55916bd.zip
Merge branch 'hb/stdlib/epp_typed_record_fields/OTP-13148'
* hb/stdlib/epp_typed_record_fields/OTP-13148: stdlib: Update qlc_pt to handle typed record fields stdlib: Let the linter detect old typed records stdlib: Update the linter to handle typed record fields stdlib: Update erl_expand_records to handle typed record fields compiler: Update the compiler to handle typed record fields stdlib: Update erl_id_trans to handle types and specs stdlib: Add a Cover test with typed record field stdlib: Update module shell to handle typed record fields stdlib: Update ms_transform to handle typed record fields stdlib: Modify the preprocessor as to expose typed record fields
Diffstat (limited to 'lib/stdlib/src/shell.erl')
-rw-r--r--lib/stdlib/src/shell.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/stdlib/src/shell.erl b/lib/stdlib/src/shell.erl
index ce1d9eb0ff..82a3a2be4f 100644
--- a/lib/stdlib/src/shell.erl
+++ b/lib/stdlib/src/shell.erl
@@ -917,9 +917,9 @@ expand_records(UsedRecords, E0) ->
RecordDefs = [Def || {_Name,Def} <- UsedRecords],
L = erl_anno:new(1),
E = prep_rec(E0),
- Forms = RecordDefs ++ [{function,L,foo,0,[{clause,L,[],[],[E]}]}],
- [{function,L,foo,0,[{clause,L,[],[],[NE]}]}] =
- erl_expand_records:module(Forms, [strict_record_tests]),
+ Forms0 = RecordDefs ++ [{function,L,foo,0,[{clause,L,[],[],[E]}]}],
+ Forms = erl_expand_records:module(Forms0, [strict_record_tests]),
+ {function,L,foo,0,[{clause,L,[],[],[NE]}]} = lists:last(Forms),
prep_rec(NE).
prep_rec({value,_CommandN,_V}=Value) ->
@@ -1081,6 +1081,8 @@ record_fields([{record_field,_,{atom,_,Field}} | Fs]) ->
[Field | record_fields(Fs)];
record_fields([{record_field,_,{atom,_,Field},_} | Fs]) ->
[Field | record_fields(Fs)];
+record_fields([{typed_record_field,Field,_Type} | Fs]) ->
+ record_fields([Field | Fs]);
record_fields([]) ->
[].