diff options
author | Björn Gustavsson <[email protected]> | 2014-02-07 12:14:07 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-02-07 12:14:07 +0100 |
commit | 0cbf6ec7444df2c0441debc6bcd5aba0bbc7104d (patch) | |
tree | 411508c016993984472ab482b25b2b6d2f54b7e9 /lib/tools/src | |
parent | d9283db0943ec94d737a28e31fdb63feb08a8e00 (diff) | |
parent | 2cf4803f3e49eeadda29b50b6b26370312e8a482 (diff) | |
download | otp-0cbf6ec7444df2c0441debc6bcd5aba0bbc7104d.tar.gz otp-0cbf6ec7444df2c0441debc6bcd5aba0bbc7104d.tar.bz2 otp-0cbf6ec7444df2c0441debc6bcd5aba0bbc7104d.zip |
Merge branch 'nox/tools/cover-record-update'
* nox/tools/cover-record-update:
Properly munge record updates in cover
Don't munge record and field names in cover
Diffstat (limited to 'lib/tools/src')
-rw-r--r-- | lib/tools/src/cover.erl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl index 6aeb251ac2..d26b8adfcd 100644 --- a/lib/tools/src/cover.erl +++ b/lib/tools/src/cover.erl @@ -1800,16 +1800,19 @@ 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, Vars2} = munge_exprs(Exprs, Vars, []), + {{record,Line,Name,MungedExprFields}, Vars2}; +munge_expr({record,Line,Arg,Name,Exprs}, Vars) -> + %% Only for Vsn=raw_abstract_v1 + {MungedArg, Vars2} = munge_expr(Arg, Vars), {MungedExprFields, Vars3} = munge_exprs(Exprs, Vars2, []), - {{record,Line,MungedExprName,MungedExprFields}, Vars3}; + {{record,Line,MungedArg,Name,MungedExprFields}, Vars3}; 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), |