aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2011-03-21 18:36:05 +0200
committerHenrik Nord <[email protected]>2011-05-04 15:06:16 +0200
commit50184171c3b28270aae9f21926383185e9188234 (patch)
treedefbe2bef945eb6b81586e6a20c42b72ca56ebc3 /lib/dialyzer/test/small_SUITE_data/src
parent320bfe173aedf71a60d2b3c69d6422fd4abcfd4a (diff)
downloadotp-50184171c3b28270aae9f21926383185e9188234.tar.gz
otp-50184171c3b28270aae9f21926383185e9188234.tar.bz2
otp-50184171c3b28270aae9f21926383185e9188234.zip
Add small/none_scc_inf_loop
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data/src')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/none_scc_inf_loop.erl21
1 files changed, 21 insertions, 0 deletions
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).