aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-07-29 11:42:26 +0200
committerFredrik Gustafsson <[email protected]>2013-07-29 11:42:26 +0200
commit0481ecafa24dc60c6bca8afdda038dc2239c991d (patch)
treecaa6cdc49a8702d0f94cdba70b75eb185b6c98ce /lib/compiler/test
parent6d3ee671a9c7a0ca9113bdedfd3f5ff630d8702f (diff)
parent874867a332b70ace8efc1e1e1f27e2bc31e9a297 (diff)
downloadotp-0481ecafa24dc60c6bca8afdda038dc2239c991d.tar.gz
otp-0481ecafa24dc60c6bca8afdda038dc2239c991d.tar.bz2
otp-0481ecafa24dc60c6bca8afdda038dc2239c991d.zip
Merge branch 'nox/fix-comp-warnings/OTP-11212' into maint
* nox/fix-comp-warnings/OTP-11212: Bootstrap Silence a misleading warning with some comprehensions
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/warnings_SUITE.erl14
1 files changed, 12 insertions, 2 deletions
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.
%%%