aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2013-01-22 17:57:54 +0100
committerStavros Aronis <[email protected]>2013-01-22 17:57:54 +0100
commit6126143eda4fc9cea7a2928de1b11cfddec0e2bb (patch)
tree8bede65211c2f737c81228c2f8f5314069957aca /lib/dialyzer/test/small_SUITE_data
parent9b01d9553434256b93b4899caf042d857f6ef068 (diff)
downloadotp-6126143eda4fc9cea7a2928de1b11cfddec0e2bb.tar.gz
otp-6126143eda4fc9cea7a2928de1b11cfddec0e2bb.tar.bz2
otp-6126143eda4fc9cea7a2928de1b11cfddec0e2bb.zip
Properly support functions with arbitrary arity in type specs.
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/unknown_arity_function_spec.erl10
1 files changed, 10 insertions, 0 deletions
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).