aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes2
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-03-17 09:53:32 +0100
committerHans Bolinder <[email protected]>2014-03-21 14:19:15 +0100
commitc777e4096a21f9734a1cec8d723137299b0f9193 (patch)
treeba035cb658a8e645b0c50aa3016ad8c7ba2ba5b2 /lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes2
parent4d614d868f90cfae31046038e6f178002a13c9ef (diff)
downloadotp-c777e4096a21f9734a1cec8d723137299b0f9193.tar.gz
otp-c777e4096a21f9734a1cec8d723137299b0f9193.tar.bz2
otp-c777e4096a21f9734a1cec8d723137299b0f9193.zip
dialyzer: generalize guard constraints in a new way
Guard constraints used to be limited to a certain depth, which handled mutually depending constraints safely, but also sometimes introduced unnecessary generalizations. This patch puts no explicit limit upon guard constraints (other than those that already exist in erl_types), but breaks cycles by replacing variables with the any() type. In some cases the old method resulted in more warnings, but since the limit was quite arbitrary and mutually depending guard constraints are (very) rare, the new method should been seen as an improvement since it handles cases that used to make Dialyzer loop or miss warnings.
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes2')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes23
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes2 b/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes2
new file mode 100644
index 0000000000..9f5433a13d
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes2
@@ -0,0 +1,3 @@
+
+contracts_with_subtypes2.erl:18: Function t/0 has no local return
+contracts_with_subtypes2.erl:19: The call contracts_with_subtypes2:t({'a',{'b',{'c',{'d',{'e',{'g',3}}}}}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A}), is_subtype(A,{'b',B}), is_subtype(B,{'c',C}), is_subtype(C,{'d',D}), is_subtype(D,{'e',E}), is_subtype(E,{'f',_})