From b9ff88aa620d3e70e2cf6854fce90adf40f67240 Mon Sep 17 00:00:00 2001
From: Stavros Aronis <aronisstav@gmail.com>
Date: Tue, 22 Jan 2013 17:57:54 +0100
Subject: Properly support functions with arbitrary arity in type specs.

Dialyzer now understands the "fun(...)" syntax in type specs.
---
 .../test/small_SUITE_data/src/unknown_arity_function_spec.erl  | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 lib/dialyzer/test/small_SUITE_data/src/unknown_arity_function_spec.erl

(limited to 'lib/dialyzer')

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).
-- 
cgit v1.2.3