From 35984f11f0411b09bc945273d7faa0b4ed8b6e66 Mon Sep 17 00:00:00 2001 From: Stavros Aronis Date: Mon, 21 Mar 2011 18:33:31 +0200 Subject: Add small/blame_contract_range --- .../test/small_SUITE_data/src/blame_contract_range.erl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/dialyzer/test/small_SUITE_data/src/blame_contract_range.erl (limited to 'lib/dialyzer/test/small_SUITE_data/src') diff --git a/lib/dialyzer/test/small_SUITE_data/src/blame_contract_range.erl b/lib/dialyzer/test/small_SUITE_data/src/blame_contract_range.erl new file mode 100644 index 0000000000..efd3332b44 --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/blame_contract_range.erl @@ -0,0 +1,16 @@ +%%----------------------------------------------------------------------- +%% A test where the contract is wrongly specified by the programmer; +%% however, this is found only by refinement. +%% Dialyzer in R14B01 and prior gave a confusing (if not bogus) warning +%% for this case. Corrected in R14B02. +%%----------------------------------------------------------------------- +-module(blame_contract_range). + +-export([foo/0]). + +foo() -> + bar(b). + +-spec bar(atom()) -> a. +bar(a) -> a; +bar(b) -> b. -- cgit v1.2.3