aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/indent_SUITE_data/src/blame_contract_range.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dialyzer/test/indent_SUITE_data/src/blame_contract_range.erl')
-rw-r--r--lib/dialyzer/test/indent_SUITE_data/src/blame_contract_range.erl16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/dialyzer/test/indent_SUITE_data/src/blame_contract_range.erl b/lib/dialyzer/test/indent_SUITE_data/src/blame_contract_range.erl
new file mode 100644
index 0000000000..efd3332b44
--- /dev/null
+++ b/lib/dialyzer/test/indent_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.