aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/erl_lint.erl
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2015-02-22 13:31:35 +0100
committerAnthony Ramine <[email protected]>2015-02-22 13:31:35 +0100
commit814f9b367c33a9f28b78b18ef97c674b2918d258 (patch)
treec6e5c6e75ecad753c85703b0ea0041ae08df29be /lib/stdlib/src/erl_lint.erl
parent4f7edc376ee61238699f68c8721ab23ee56eafee (diff)
downloadotp-814f9b367c33a9f28b78b18ef97c674b2918d258.tar.gz
otp-814f9b367c33a9f28b78b18ef97c674b2918d258.tar.bz2
otp-814f9b367c33a9f28b78b18ef97c674b2918d258.zip
Remove a few superfluous vt operations in erl_lint
Given any Vt1 and Vt2 values, vtmerge(vtnew(Vt1, Vt2), vtold(Vt1, Vt2)) is always equal to Vt1.
Diffstat (limited to 'lib/stdlib/src/erl_lint.erl')
-rw-r--r--lib/stdlib/src/erl_lint.erl9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl
index 26d8454731..772b0bf642 100644
--- a/lib/stdlib/src/erl_lint.erl
+++ b/lib/stdlib/src/erl_lint.erl
@@ -2266,11 +2266,10 @@ expr({remote,Line,_M,_F}, _Vt, St) ->
%% {UsedVarTable,State}
expr_list(Es, Vt, St) ->
- {Vt1,St1} = foldl(fun (E, {Esvt,St0}) ->
- {Evt,St1} = expr(E, Vt, St0),
- {vtmerge_pat(Evt, Esvt),St1}
- end, {[],St}, Es),
- {vtmerge(vtnew(Vt1, Vt), vtold(Vt1, Vt)),St1}.
+ foldl(fun (E, {Esvt,St0}) ->
+ {Evt,St1} = expr(E, Vt, St0),
+ {vtmerge_pat(Evt, Esvt),St1}
+ end, {[],St}, Es).
record_expr(Line, Rec, Vt, St0) ->
St1 = warn_invalid_record(Line, Rec, St0),