aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-04-10 15:18:45 +0200
committerGitHub <[email protected]>2019-04-10 15:18:45 +0200
commit326c3cb70c1b37c794b781a42c50725766098810 (patch)
tree2318463c0c3f1cedf06013fdf16b3452b2bf8ef8 /lib/stdlib/src
parent1edbf63cf20b44d2bdc9370427ee2575f07f642d (diff)
parent23a497af427493b94739761e4d4974e12bc67579 (diff)
downloadotp-326c3cb70c1b37c794b781a42c50725766098810.tar.gz
otp-326c3cb70c1b37c794b781a42c50725766098810.tar.bz2
otp-326c3cb70c1b37c794b781a42c50725766098810.zip
Merge pull request #2205 from bjorng/bjorn/record_info/ERL-907
Issue an error for improper use of record_info/2 in a fun OTP-15760
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/erl_lint.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl
index 00fd731e1d..e0c37ca030 100644
--- a/lib/stdlib/src/erl_lint.erl
+++ b/lib/stdlib/src/erl_lint.erl
@@ -2276,6 +2276,9 @@ expr({'fun',Line,Body}, Vt, St) ->
case Body of
{clauses,Cs} ->
fun_clauses(Cs, Vt, St);
+ {function,record_info,2} ->
+ %% It is illegal to call record_info/2 with unknown arguments.
+ {[],add_error(Line, illegal_record_info, St)};
{function,F,A} ->
%% BifClash - Fun expression
%% N.B. Only allows BIFs here as well, NO IMPORTS!!