aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/parsetools/src/leex.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/parsetools/src/leex.erl b/lib/parsetools/src/leex.erl
index 3e226229f8..cdf20461d9 100644
--- a/lib/parsetools/src/leex.erl
+++ b/lib/parsetools/src/leex.erl
@@ -282,8 +282,8 @@ do_error_return(St, Es, Ws) ->
end.
werror(St) ->
- member(warnings_as_errors, St#leex.opts)
- andalso length(St#leex.warnings) > 0.
+ St#leex.warnings =/= []
+ andalso member(warnings_as_errors, St#leex.opts).
pack_errors([{File,_} | _] = Es) ->
[{File, flatmap(fun({_,E}) -> [E] end, sort(Es))}];