From 6a0d7e9abef8474ae1de739868ecb2245e8aa6a8 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 8 Jun 2016 08:35:10 +0200 Subject: Dialyzer: Fix a bug that caused Dialyzer to go into an infinite loop. Dialyzer failed to remove all loops among constraints. --- lib/dialyzer/test/small_SUITE_data/src/loopy.erl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lib/dialyzer/test/small_SUITE_data/src/loopy.erl (limited to 'lib/dialyzer/test/small_SUITE_data/src') 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. -- cgit v1.2.3