From 67c7fd3c516b08d3d8814debca0db2a295e0c0b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20L=C3=A5ng?= Date: Tue, 1 Mar 2016 12:51:16 +0100 Subject: dialyzer_contracts: Consider #{} a violation This is analogous to the case of nil. Since #{} is a base-case of almost all map types, contract and success typing sharing #{} does not mean much, and is often sign of a violation. --- lib/dialyzer/test/map_SUITE_data/results/contract_violation | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 lib/dialyzer/test/map_SUITE_data/results/contract_violation (limited to 'lib/dialyzer/test/map_SUITE_data/results') diff --git a/lib/dialyzer/test/map_SUITE_data/results/contract_violation b/lib/dialyzer/test/map_SUITE_data/results/contract_violation new file mode 100644 index 0000000000..958321618f --- /dev/null +++ b/lib/dialyzer/test/map_SUITE_data/results/contract_violation @@ -0,0 +1,3 @@ + +contract_violation.erl:12: The pattern #{I:=Loc} can never match the type #{} +contract_violation.erl:16: Invalid type specification for function contract_violation:beam_disasm_lines/2. The success typing is ('none' | <<_:32,_:_*8>>,_) -> #{pos_integer()=>{'location',_,_}} -- cgit v1.2.3