From a0988a638a92211ae0af6ec35ca99edfc05110aa Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Sat, 10 Nov 2012 21:32:31 +0100 Subject: Test named funs --- lib/dialyzer/test/small_SUITE_data/results/eep37 | 0 lib/dialyzer/test/small_SUITE_data/src/eep37.erl | 15 +++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 lib/dialyzer/test/small_SUITE_data/results/eep37 create mode 100644 lib/dialyzer/test/small_SUITE_data/src/eep37.erl (limited to 'lib/dialyzer') diff --git a/lib/dialyzer/test/small_SUITE_data/results/eep37 b/lib/dialyzer/test/small_SUITE_data/results/eep37 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/dialyzer/test/small_SUITE_data/src/eep37.erl b/lib/dialyzer/test/small_SUITE_data/src/eep37.erl new file mode 100644 index 0000000000..2818688f95 --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/eep37.erl @@ -0,0 +1,15 @@ +-module(eep37). + +-compile(export_all). + +-spec self() -> fun(() -> fun()). +self() -> + fun Self() -> Self end. + +-spec fact() -> fun((non_neg_integer()) -> non_neg_integer()). +fact() -> + fun Fact(N) when N > 0 -> + N * Fact(N - 1); + Fact(0) -> + 1 + end. -- cgit v1.2.3