aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-01-23 10:51:58 +0100
committerFredrik Gustafsson <[email protected]>2013-01-23 10:51:58 +0100
commit744228a03cde1a45e905d563da2546419926c7ee (patch)
tree200cae2afb8ff20065ba002e2020f191fa373c63 /lib/dialyzer
parentd777ca94944b6a9dbcfd7defc21f59935989e1a4 (diff)
parent250c2fef8242317c741c83c2b4ec2283fe4bceb5 (diff)
downloadotp-744228a03cde1a45e905d563da2546419926c7ee.tar.gz
otp-744228a03cde1a45e905d563da2546419926c7ee.tar.bz2
otp-744228a03cde1a45e905d563da2546419926c7ee.zip
Merge branch 'sa/dialyzer-list-spec/OTP-10740'
* sa/dialyzer-list-spec/OTP-10740: Report spec discrepancy on mismatching lists Properly support functions with arbitrary arity in type specs. Conflicts: lib/dialyzer/test/small_SUITE_data/results/empty_list_infimum
Diffstat (limited to 'lib/dialyzer')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/empty_list_infimum4
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/unknown_arity_function_spec.erl10
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/results/empty_list_infimum b/lib/dialyzer/test/small_SUITE_data/results/empty_list_infimum
index a59986cba5..75f1b25725 100644
--- a/lib/dialyzer/test/small_SUITE_data/results/empty_list_infimum
+++ b/lib/dialyzer/test/small_SUITE_data/results/empty_list_infimum
@@ -1,2 +1,6 @@
+<<<<<<< HEAD
empty_list_infimum.erl:39: Invalid type specification for function empty_list_infimum:list_vhost_permissions/1. The success typing is (_) -> [[{_,_}]]
+=======
+empty_list_infimum.erl:38: Invalid type specification for function empty_list_infimum:list_vhost_permissions/1. The success typing is (_) -> [[{_,_}]]
+>>>>>>> sa/dialyzer-list-spec/OTP-10740
diff --git a/lib/dialyzer/test/small_SUITE_data/src/unknown_arity_function_spec.erl b/lib/dialyzer/test/small_SUITE_data/src/unknown_arity_function_spec.erl
new file mode 100644
index 0000000000..c7d7459614
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/unknown_arity_function_spec.erl
@@ -0,0 +1,10 @@
+-module(unknown_arity_function_spec).
+
+-export([test/2]).
+
+%-type t() :: 42 | fun((...) -> t()).
+%-type f() :: fun((...) -> 42).
+
+-spec test(fun((...) -> 42), list()) -> 42.
+test(F, L) ->
+ 42 = apply(F, L).