File 0161-Correct-erl_lint-is_guard_expr-1.patch of Package erlang
From 00ce8258e84007514238f286aab85b5a36896cf1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org>
Date: Tue, 21 Jan 2020 13:07:31 +0100
Subject: [PATCH 01/14] Correct erl_lint:is_guard_expr/1
A call to a guard BIF (such as `length/1`) without an `erlang` module prefix
would not be considered valid.
---
lib/stdlib/src/erl_lint.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl
index 8be07e6c45..e6fb1cc85f 100644
--- a/lib/stdlib/src/erl_lint.erl
+++ b/lib/stdlib/src/erl_lint.erl
@@ -2184,7 +2184,7 @@ is_guard_test2(G, Info) ->
%% is_guard_expr(Expression) -> boolean().
%% Test if an expression is a guard expression.
-is_guard_expr(E) -> is_gexpr(E, []).
+is_guard_expr(E) -> is_gexpr(E, {[],fun({_,_}) -> false end}).
is_gexpr({var,_L,_V}, _Info) -> true;
is_gexpr({char,_L,_C}, _Info) -> true;
--
2.16.4