From fd9b5ae4193fbab66093c88728c0dbeaa3b57312 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Mon, 27 Aug 2018 13:14:29 +0200 Subject: dialyzer: Improve handling of complex guards See also https://bugs.erlang.org/browse/ERL-680. The right associative short circuit expressions 'andalso' and 'orelse' are expanded by the Compiler (see v3_core) into 'case' expressions. If parentheses are used to enforce left associativeness, variables are introduced, and the time needed by Dialyzer increases exponentially. Rather than trying to fix Dialyzer itself, v3_core now rewrites repeated use of 'andalso' ('orelse') into right associative expressions before creating the 'case' expressions. --- lib/dialyzer/test/small_SUITE_data/results/left_assoc | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 lib/dialyzer/test/small_SUITE_data/results/left_assoc (limited to 'lib/dialyzer/test/small_SUITE_data/results') diff --git a/lib/dialyzer/test/small_SUITE_data/results/left_assoc b/lib/dialyzer/test/small_SUITE_data/results/left_assoc new file mode 100644 index 0000000000..58cdad29de --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/results/left_assoc @@ -0,0 +1,2 @@ + +left_assoc.erl:93: The variable __@2 can never match since previous clauses completely covered the type binary() -- cgit v1.2.3