diff options
author | Anthony Ramine <[email protected]> | 2014-02-01 18:52:09 +0100 |
---|---|---|
committer | Anthony Ramine <[email protected]> | 2014-02-01 20:11:19 +0100 |
commit | 555b40a98c4181416c54d5c121c229f593a72cfc (patch) | |
tree | 3a973a30b1da07b1f1dbcec2934a059e59b8bff3 /lib | |
parent | 23790daf1a2d384b0fc11c655fa825151d9fa420 (diff) | |
download | otp-555b40a98c4181416c54d5c121c229f593a72cfc.tar.gz otp-555b40a98c4181416c54d5c121c229f593a72cfc.tar.bz2 otp-555b40a98c4181416c54d5c121c229f593a72cfc.zip |
Don't munge record and field names in cover
They are bare atoms, atoms or variables in the abstract format, there is no need to
pass them through munge_expr/2.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tools/src/cover.erl | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl index 13d9aefb0c..cd5e3b9955 100644 --- a/lib/tools/src/cover.erl +++ b/lib/tools/src/cover.erl @@ -1800,16 +1800,14 @@ munge_expr({match,Line,ExprL,ExprR}, Vars) -> munge_expr({tuple,Line,Exprs}, Vars) -> {MungedExprs, Vars2} = munge_exprs(Exprs, Vars, []), {{tuple,Line,MungedExprs}, Vars2}; -munge_expr({record,Line,Expr,Exprs}, Vars) -> +munge_expr({record,Line,Name,Exprs}, Vars) -> %% Only for Vsn=raw_abstract_v1 - {MungedExprName, Vars2} = munge_expr(Expr, Vars), - {MungedExprFields, Vars3} = munge_exprs(Exprs, Vars2, []), - {{record,Line,MungedExprName,MungedExprFields}, Vars3}; + {MungedExprFields, Vars2} = munge_exprs(Exprs, Vars, []), + {{record,Line,Name,MungedExprFields}, Vars2}; munge_expr({record_field,Line,ExprL,ExprR}, Vars) -> %% Only for Vsn=raw_abstract_v1 - {MungedExprL, Vars2} = munge_expr(ExprL, Vars), - {MungedExprR, Vars3} = munge_expr(ExprR, Vars2), - {{record_field,Line,MungedExprL,MungedExprR}, Vars3}; + {MungedExprR, Vars2} = munge_expr(ExprR, Vars), + {{record_field,Line,ExprL,MungedExprR}, Vars2}; munge_expr({cons,Line,ExprH,ExprT}, Vars) -> {MungedExprH, Vars2} = munge_expr(ExprH, Vars), {MungedExprT, Vars3} = munge_expr(ExprT, Vars2), |