aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tools')
-rw-r--r--lib/tools/doc/src/notes.xml26
-rw-r--r--lib/tools/src/cover.erl4
-rw-r--r--lib/tools/test/cover_SUITE.erl29
-rw-r--r--lib/tools/vsn.mk2
4 files changed, 49 insertions, 12 deletions
diff --git a/lib/tools/doc/src/notes.xml b/lib/tools/doc/src/notes.xml
index 985207a39b..c62b0607ee 100644
--- a/lib/tools/doc/src/notes.xml
+++ b/lib/tools/doc/src/notes.xml
@@ -31,6 +31,32 @@
</header>
<p>This document describes the changes made to the Tools application.</p>
+<section><title>Tools 2.8.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ <c>cover:compile_beam/1</c> and
+ <c>cover:compile_beam_directory/1,2</c> crashed when
+ trying to compile a beam file without a <c>'file'</c>
+ attribute. This has been corrected and an error is
+ returned instead.</p>
+ <p>
+ Thanks to Louis-Philippe Gauthier for reporting this bug.</p>
+ <p>
+ Own Id: OTP-13200</p>
+ </item>
+ <item>
+ <p>Fix a bit string comprehension bug in Cover. </p>
+ <p>
+ Own Id: OTP-13277 Aux Id: PR 856 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Tools 2.8.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl
index 3732b0fc85..87de31919f 100644
--- a/lib/tools/src/cover.erl
+++ b/lib/tools/src/cover.erl
@@ -2002,9 +2002,7 @@ munge_expr({lc,Line,Expr,Qs}, Vars) ->
{MungedQs, Vars3} = munge_qualifiers(Qs, Vars2),
{{lc,Line,MungedExpr,MungedQs}, Vars3};
munge_expr({bc,Line,Expr,Qs}, Vars) ->
- {bin,BLine,[{bin_element,EL,Val,Sz,TSL}|Es]} = Expr,
- Expr2 = {bin,BLine,[{bin_element,EL,Val,Sz,TSL}|Es]},
- {MungedExpr,Vars2} = munge_expr(Expr2, Vars),
+ {MungedExpr,Vars2} = munge_expr(?BLOCK1(Expr), Vars),
{MungedQs, Vars3} = munge_qualifiers(Qs, Vars2),
{{bc,Line,MungedExpr,MungedQs}, Vars3};
munge_expr({block,Line,Body}, Vars) ->
diff --git a/lib/tools/test/cover_SUITE.erl b/lib/tools/test/cover_SUITE.erl
index b9a9cd5be4..d4b346c407 100644
--- a/lib/tools/test/cover_SUITE.erl
+++ b/lib/tools/test/cover_SUITE.erl
@@ -29,7 +29,7 @@ all() ->
NoStartStop = [eif,otp_5305,otp_5418,otp_7095,otp_8273,
otp_8340,otp_8188,compile_beam_opts,eep37,
analyse_no_beam, line_0, compile_beam_no_file,
- otp_13277],
+ otp_13277, otp_13289],
StartStop = [start, compile, analyse, misc, stop,
distribution, reconnect, die_and_reconnect,
dont_reconnect_after_stop, stop_node_after_disconnect,
@@ -1253,7 +1253,7 @@ otp_8340(doc) ->
["OTP-8340. Bug."];
otp_8340(suite) -> [];
otp_8340(Config) when is_list(Config) ->
- ?line [{{t,1},1},{{t,4},1}] =
+ [{{t,1},1},{{t,2},1},{{t,4},1}] =
analyse_expr(<<"<< \n"
" <<3:2, \n"
" SeqId:62>> \n"
@@ -1547,10 +1547,8 @@ comprehension_8188(Cf) ->
" true]. \n" % 2
" two() -> 2">>, Cf), % 1
- %% The template cannot have a counter since it is not allowed to
- %% be a block.
?line [{{t,1},1},
- %% {{t,2},2},
+ {{t,2},2},
{{t,3},1},
{{t,4},1},
{{t,5},0},
@@ -1560,7 +1558,7 @@ comprehension_8188(Cf) ->
{{t,13},2},
{{t,14},2}] =
analyse_expr(<<"<< \n" % 1
- " << (X*2) >> || \n" % 2 (now: 0)
+ " << (X*2) >> || \n" % 2
" <<X>> <= << (case two() of\n"
" 2 -> 1;\n" % 1
" _ -> 2\n" % 0
@@ -1575,7 +1573,7 @@ comprehension_8188(Cf) ->
"two() -> 2">>, Cf),
?line [{{t,1},1},
- %% {{t,2},4},
+ {{t,2},4},
{{t,4},1},
{{t,6},1},
{{t,7},0},
@@ -1584,7 +1582,7 @@ comprehension_8188(Cf) ->
{{t,12},4},
{{t,13},1}] =
analyse_expr(<<"<< \n" % 1
- " << (2)\n" % 4 (now: 0)
+ " << (2)\n" % 4
" :(8) >> || \n"
" <<X>> <= << 1,\n" % 1
" (case two() of \n"
@@ -1766,6 +1764,21 @@ otp_13277(Config) ->
?line ok = file:delete(File),
ok.
+%% Test general expressions in a binary comprehension.
+otp_13289(Config) ->
+ Test = <<"-module(t).
+ -export([t/0]).
+
+ t() ->
+ << (id(<<I>>)) || I <- [1,2,3] >>.
+
+ id(I) -> I.
+ ">>,
+ File = cc_mod(t, Test, Config),
+ <<1,2,3>> = t:t(),
+ ok = file:delete(File),
+ ok.
+
%%--Auxiliary------------------------------------------------------------
analyse_expr(Expr, Config) ->
diff --git a/lib/tools/vsn.mk b/lib/tools/vsn.mk
index 3efe89d9f9..70564f05c6 100644
--- a/lib/tools/vsn.mk
+++ b/lib/tools/vsn.mk
@@ -1 +1 @@
-TOOLS_VSN = 2.8.2
+TOOLS_VSN = 2.8.3