aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-07-29 11:58:56 +0200
committerFredrik Gustafsson <[email protected]>2013-07-29 11:58:56 +0200
commit989daf58ebeec07c7f15325ff7b843e02d28e810 (patch)
tree3e7ccc32b8b7d855fd8ce46198dcb0e29bc331ad
parent280305a104bd1ecac3a270360949257791d4906b (diff)
parent0481ecafa24dc60c6bca8afdda038dc2239c991d (diff)
downloadotp-989daf58ebeec07c7f15325ff7b843e02d28e810.tar.gz
otp-989daf58ebeec07c7f15325ff7b843e02d28e810.tar.bz2
otp-989daf58ebeec07c7f15325ff7b843e02d28e810.zip
Merge branch 'maint'
Conflicts: bootstrap/lib/compiler/ebin/v3_core.beam
-rw-r--r--bootstrap/lib/compiler/ebin/v3_core.beambin51152 -> 51268 bytes
-rw-r--r--lib/compiler/src/v3_core.erl6
-rw-r--r--lib/compiler/test/warnings_SUITE.erl14
3 files changed, 16 insertions, 4 deletions
diff --git a/bootstrap/lib/compiler/ebin/v3_core.beam b/bootstrap/lib/compiler/ebin/v3_core.beam
index 39a54adddc..1cfb8b1aaa 100644
--- a/bootstrap/lib/compiler/ebin/v3_core.beam
+++ b/bootstrap/lib/compiler/ebin/v3_core.beam
Binary files differ
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl
index 8159b42f2f..6dc4f3f300 100644
--- a/lib/compiler/src/v3_core.erl
+++ b/lib/compiler/src/v3_core.erl
@@ -956,7 +956,8 @@ lc_tq(Line, E, [Fil0|Qs0], Mc, St0) ->
args=[],
clauses=[#iclause{anno=LAnno,pats=[],
guard=Gs,body=Lps ++ [Lc]}],
- fc=#iclause{anno=LAnno,pats=[],guard=[],body=[Mc]}},
+ fc=#iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
+ pats=[],guard=[],body=[Mc]}},
[],St2};
false ->
{Lc,Lps,St1} = lc_tq(Line, E, Qs0, Mc, St0),
@@ -1101,7 +1102,8 @@ bc_tq1(Line, E, [Fil0|Qs0], AccVar, St0) ->
clauses=[#iclause{anno=LAnno,
pats=[],
guard=Gs,body=Bps ++ [Bc]}],
- fc=#iclause{anno=LAnno,pats=[],guard=[],body=[AccVar]}},
+ fc=#iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
+ pats=[],guard=[],body=[AccVar]}},
[],St};
false ->
{Bc,Bps,St1} = bc_tq1(Line, E, Qs0, AccVar, St0),
diff --git a/lib/compiler/test/warnings_SUITE.erl b/lib/compiler/test/warnings_SUITE.erl
index f00bfe663b..810b2b48c9 100644
--- a/lib/compiler/test/warnings_SUITE.erl
+++ b/lib/compiler/test/warnings_SUITE.erl
@@ -37,7 +37,7 @@
-export([pattern/1,pattern2/1,pattern3/1,pattern4/1,
guard/1,bad_arith/1,bool_cases/1,bad_apply/1,
- files/1,effect/1,bin_opt_info/1,bin_construction/1]).
+ files/1,effect/1,bin_opt_info/1,bin_construction/1, comprehensions/1]).
% Default timetrap timeout (set in init_per_testcase).
-define(default_timeout, ?t:minutes(2)).
@@ -61,7 +61,7 @@ groups() ->
[{p,test_lib:parallel(),
[pattern,pattern2,pattern3,pattern4,guard,
bad_arith,bool_cases,bad_apply,files,effect,
- bin_opt_info,bin_construction]}].
+ bin_opt_info,bin_construction,comprehensions]}].
init_per_suite(Config) ->
Config.
@@ -536,6 +536,16 @@ bin_construction(Config) when is_list(Config) ->
ok.
+comprehensions(Config) when is_list(Config) ->
+ Ts = [{tautologic_guards,
+ <<"
+ f() -> [ true || true ].
+ g() -> << <<1>> || true >>.
+ ">>,
+ [], []}],
+ run(Config, Ts),
+ ok.
+
%%%
%%% End of test cases.
%%%