aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-01-28 15:58:44 +0100
committerBjörn Gustavsson <[email protected]>2013-01-31 11:14:47 +0100
commit264f9212dbd81557cdf4d9da1b5f0fb50b82eea3 (patch)
treea6c0a9894039d979d70803edefb90bff2869d03d /lib
parente5d592e8258095a49d112fafeb5d67e85d196727 (diff)
downloadotp-264f9212dbd81557cdf4d9da1b5f0fb50b82eea3.tar.gz
otp-264f9212dbd81557cdf4d9da1b5f0fb50b82eea3.tar.bz2
otp-264f9212dbd81557cdf4d9da1b5f0fb50b82eea3.zip
Test a few more kinds of illegal guard expressions
Diffstat (limited to 'lib')
-rw-r--r--lib/stdlib/test/erl_lint_SUITE.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/stdlib/test/erl_lint_SUITE.erl b/lib/stdlib/test/erl_lint_SUITE.erl
index 056021b8aa..ac56ba56d9 100644
--- a/lib/stdlib/test/erl_lint_SUITE.erl
+++ b/lib/stdlib/test/erl_lint_SUITE.erl
@@ -1352,7 +1352,17 @@ guard(Config) when is_list(Config) ->
(is_record(X, apa)*2)].
">>,
[],
- []}],
+ []},
+ {guard8,
+ <<"t(A) when erlang:is_foobar(A) -> ok;
+ t(A) when A ! ok -> ok;
+ t(A) when A ++ [x] -> ok."
+ >>,
+ [],
+ {errors,[{1,erl_lint,illegal_guard_expr},
+ {2,erl_lint,illegal_guard_expr},
+ {3,erl_lint,illegal_guard_expr}],[]}}
+ ],
?line [] = run(Config, Ts1),
ok.