aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2016-06-08 13:13:04 +0200
committerStavros Aronis <[email protected]>2016-06-08 13:13:04 +0200
commitb13412d2e4331fa426a6722a04310cbcbf1731d6 (patch)
tree17fba1d7099d652eeab812b4b1a72e44cc9277bd /lib/dialyzer/test/small_SUITE_data
parentd26c15e07229c90ba8353bd78d5406ada0f13271 (diff)
downloadotp-b13412d2e4331fa426a6722a04310cbcbf1731d6.tar.gz
otp-b13412d2e4331fa426a6722a04310cbcbf1731d6.tar.bz2
otp-b13412d2e4331fa426a6722a04310cbcbf1731d6.zip
Fix a bug in Dialyzer related to call-site analysis
Dialyzer's "dataflow" module is using information from the callgraph to determine which functions may be called at a particular call-site. Unfortunately this information can include functions that are certainly not among the possible choices. We don't want to emit warnings in such cases, so a "reasonable" compromise is to stay silent if there are many possible funs and at least one of them can succeed. Bug reported by Dan Gudmundsson, test shrunk down by Magnus Lång.
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/higher_order_discrepancy5
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/higher_order_discrepancy.erl5
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/results/higher_order_discrepancy b/lib/dialyzer/test/small_SUITE_data/results/higher_order_discrepancy
index 7ce440a60d..11b9ecade6 100644
--- a/lib/dialyzer/test/small_SUITE_data/results/higher_order_discrepancy
+++ b/lib/dialyzer/test/small_SUITE_data/results/higher_order_discrepancy
@@ -1,4 +1,3 @@
-higher_order_discrepancy.erl:11: The call higher_order_discrepancy:g('foo') will never return since it differs in the 1st argument from the success typing arguments: ('bar')
-higher_order_discrepancy.erl:14: Function g/1 has no local return
-higher_order_discrepancy.erl:14: The pattern 'bar' can never match the type 'foo'
+higher_order_discrepancy.erl:19: Function g/1 has no local return
+higher_order_discrepancy.erl:19: The pattern 'bar' can never match the type 'foo'
diff --git a/lib/dialyzer/test/small_SUITE_data/src/higher_order_discrepancy.erl b/lib/dialyzer/test/small_SUITE_data/src/higher_order_discrepancy.erl
index ff5ee6bac4..f9547d4929 100644
--- a/lib/dialyzer/test/small_SUITE_data/src/higher_order_discrepancy.erl
+++ b/lib/dialyzer/test/small_SUITE_data/src/higher_order_discrepancy.erl
@@ -1,3 +1,8 @@
+%% With the patch introduced to avoid false warnings in
+%% user_SUITE_data/src/wpc_hlines.erl we can unfortunately no longer precisely
+%% catch problems like this one... The refinement procedure is still enough to
+%% keep some of the details, nevertheless.
+
-module(higher_order_discrepancy).
-export([test/1]).