From 6126143eda4fc9cea7a2928de1b11cfddec0e2bb Mon Sep 17 00:00:00 2001 From: Stavros Aronis Date: Tue, 22 Jan 2013 17:57:54 +0100 Subject: Properly support functions with arbitrary arity 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