diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/results/none_scc_inf_loop | 5 | ||||
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/src/none_scc_inf_loop.erl | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/results/none_scc_inf_loop b/lib/dialyzer/test/small_SUITE_data/results/none_scc_inf_loop new file mode 100644 index 0000000000..3b1b204708 --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/results/none_scc_inf_loop @@ -0,0 +1,5 @@ + +none_scc_inf_loop.erl:10: Function foo/0 has no local return +none_scc_inf_loop.erl:13: Function foo/1 has no local return +none_scc_inf_loop.erl:13: The pattern 0 can never match the type 1 | 3 +none_scc_inf_loop.erl:18: Function bar/1 has no local return diff --git a/lib/dialyzer/test/small_SUITE_data/src/none_scc_inf_loop.erl b/lib/dialyzer/test/small_SUITE_data/src/none_scc_inf_loop.erl new file mode 100644 index 0000000000..111758965c --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/none_scc_inf_loop.erl @@ -0,0 +1,21 @@ +%%=========================================================================== +%% Test that made dialyzer go into an infinite loop. The reason was that +%% t_inf(t_unit(), t_none()) returned t_unit() instead of t_none() as it +%% should. The issue was identified and fixed by Stavros Aronis on 5/11/2010. +%%=========================================================================== +-module(none_scc_inf_loop). + +-export([foo/0]). + +foo() -> + foo(3). + +foo(0) -> + exit(foo); +foo(N) -> + bar(N-1). + +bar(0) -> + exit(foo); +bar(N) -> + foo(N-1). |