From 20412ad6e285a71246e660094a5e8610dfc7b71e Mon Sep 17 00:00:00 2001 From: Stavros Aronis Date: Tue, 3 Apr 2012 11:44:50 +0200 Subject: Fix crash related to contract checking When "collapsing" heads of list elements from a list's tail into the list's head the new head can be different. --- lib/dialyzer/test/small_SUITE_data/src/collapse_lists/a.erl | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/dialyzer/test/small_SUITE_data/src/collapse_lists/a.erl (limited to 'lib/dialyzer/test/small_SUITE_data/src/collapse_lists/a.erl') diff --git a/lib/dialyzer/test/small_SUITE_data/src/collapse_lists/a.erl b/lib/dialyzer/test/small_SUITE_data/src/collapse_lists/a.erl new file mode 100644 index 0000000000..7efe870b0d --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/collapse_lists/a.erl @@ -0,0 +1,9 @@ +-module(a). +-export([g/1]). + +-export_type([a/0, t/0]). +-type a() :: integer(). +-type t() :: a() | maybe_improper_list(t(), t()). + +-spec g(t()) -> t(). +g(X) -> X. -- cgit v1.2.3