aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2015-12-02 12:41:58 +0100
committerHans Bolinder <[email protected]>2016-02-17 12:58:19 +0100
commitc6135114e691a8c2f21f4d79f2566b87300857d5 (patch)
treebe7e154143ebe630e1fa55bd65bc6edc0cb19b48 /lib/stdlib/test
parente2e216eb72477103cb5930632c9f05a5f4164fae (diff)
downloadotp-c6135114e691a8c2f21f4d79f2566b87300857d5.tar.gz
otp-c6135114e691a8c2f21f4d79f2566b87300857d5.tar.bz2
otp-c6135114e691a8c2f21f4d79f2566b87300857d5.zip
stdlib: Let the linter detect old typed records
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/erl_lint_SUITE.erl17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/stdlib/test/erl_lint_SUITE.erl b/lib/stdlib/test/erl_lint_SUITE.erl
index 32247ba492..8f0ac828ec 100644
--- a/lib/stdlib/test/erl_lint_SUITE.erl
+++ b/lib/stdlib/test/erl_lint_SUITE.erl
@@ -2607,6 +2607,23 @@ otp_5878(Config) when is_list(Config) ->
">>,
?line [] = run_test2(Config, UsedByType, [warn_unused_record]),
+ %% Abstract code generated by OTP 18. Note that the type info for
+ %% record fields has been put in a separate form.
+ OldAbstract = [{attribute,1,file,{"rec.erl",1}},
+ {attribute,1,module,rec},
+ {attribute,3,export,[{t,0}]},
+ {attribute,7,record,{r,[{record_field,7,{atom,7,f}}]}},
+ {attribute,7,type,
+ {{record,r},
+ [{typed_record_field,
+ {record_field,7,{atom,7,f}},
+ {type,7,union,[{atom,7,undefined},{type,7,atom,[]}]}}],
+ []}},
+ {function,9,t,0,[{clause,9,[],[],[{record,10,r,[]}]}]},
+ {eof,11}],
+ {error,[{"rec.erl",[{7,erl_lint,old_abstract_code}]}],[]} =
+ compile:forms(OldAbstract, [return, report]),
+
ok.
otp_6885(doc) ->