aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src/loopy.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2016-06-08 08:35:10 +0200
committerHans Bolinder <[email protected]>2016-06-08 08:36:41 +0200
commit6a0d7e9abef8474ae1de739868ecb2245e8aa6a8 (patch)
tree228b8024decd1622fffb41d7aad99b9d06119ed6 /lib/dialyzer/test/small_SUITE_data/src/loopy.erl
parenta39395d4f99aff99ac57ab40a3191fa13a7371fd (diff)
downloadotp-6a0d7e9abef8474ae1de739868ecb2245e8aa6a8.tar.gz
otp-6a0d7e9abef8474ae1de739868ecb2245e8aa6a8.tar.bz2
otp-6a0d7e9abef8474ae1de739868ecb2245e8aa6a8.zip
Dialyzer: Fix a bug that caused Dialyzer to go into an infinite loop.
Dialyzer failed to remove all loops among constraints.
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data/src/loopy.erl')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/loopy.erl17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/loopy.erl b/lib/dialyzer/test/small_SUITE_data/src/loopy.erl
new file mode 100644
index 0000000000..28125ec3d9
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/loopy.erl
@@ -0,0 +1,17 @@
+%% ERL-157, OTP-13653.
+%% Would cause Dialyzer to go into an infinite loop.
+
+-module(loopy).
+
+-export([loop/1]).
+
+
+-spec loop(Args) -> ok when
+ Args :: [{Module, Args}],
+ Module :: module(),
+ Args :: any().
+loop([{Module, Args} | Rest]) ->
+ Module:init(Args),
+ loop(Rest);
+loop([]) ->
+ ok.