aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/erl_lint.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2013-08-20 15:52:48 +0200
committerHans Bolinder <[email protected]>2013-08-20 15:52:48 +0200
commit063dcba4b4e9e9848886efd039ed815bd5910ec1 (patch)
tree9cf5098a260b27e71937ae91231d29fbdc79c565 /lib/stdlib/src/erl_lint.erl
parent81ac8ee8eba862d4e8a12f88f15e2ee526d74dbd (diff)
downloadotp-063dcba4b4e9e9848886efd039ed815bd5910ec1.tar.gz
otp-063dcba4b4e9e9848886efd039ed815bd5910ec1.tar.bz2
otp-063dcba4b4e9e9848886efd039ed815bd5910ec1.zip
Fix a bug in the linter regarding the 'fun M:F/A' construct
If the fun M:F/A construct was used erroneously the linter could crash. Thanks to Mikhail Sobolev for reporting the bug.
Diffstat (limited to 'lib/stdlib/src/erl_lint.erl')
-rw-r--r--lib/stdlib/src/erl_lint.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl
index 08b8541014..8f07750b9b 100644
--- a/lib/stdlib/src/erl_lint.erl
+++ b/lib/stdlib/src/erl_lint.erl
@@ -3219,7 +3219,8 @@ modify_line(T, F0) ->
%% Forms.
modify_line1({function,F,A}, _Mf) -> {function,F,A};
-modify_line1({function,M,F,A}, _Mf) -> {function,M,F,A};
+modify_line1({function,M,F,A}, Mf) ->
+ {function,modify_line1(M, Mf),modify_line1(F, Mf),modify_line1(A, Mf)};
modify_line1({attribute,L,record,{Name,Fields}}, Mf) ->
{attribute,Mf(L),record,{Name,modify_line1(Fields, Mf)}};
modify_line1({attribute,L,spec,{Fun,Types}}, Mf) ->