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-23 14:19:47 +0100
commitb9ff88aa620d3e70e2cf6854fce90adf40f67240 (patch)
treef4e4616f9fe831c47b4c9d8d36c25aa929387420 /lib/dialyzer/test/small_SUITE_data
parent9b01d9553434256b93b4899caf042d857f6ef068 (diff)
downloadotp-b9ff88aa620d3e70e2cf6854fce90adf40f67240.tar.gz
otp-b9ff88aa620d3e70e2cf6854fce90adf40f67240.tar.bz2
otp-b9ff88aa620d3e70e2cf6854fce90adf40f67240.zip
Properly support functions with arbitrary arity in type specs.
Dialyzer now understands the "fun(...)" syntax 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).