From 66e9c3d0ef7b7c947c1d35015589667c5c2aa4f8 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 16 Apr 2014 09:13:52 +0200 Subject: hipe, dialyzer: Fix a bug concerning opaque types Dialyzer sometimes output warnings like Attempt to test for inequality between a term of type 'false' and a term of opaque type 'false' | gb_set() The reason was that erl_types:t_inf/3 when called from erl_types:t_find_unknown_opaque() did not return 'false' but found the mismatch. It should not return the mismatch unless the intersection is empty ('none'). Thanks to Shayan Pooya [shayan@liveve.org] for pointing out the bug. --- .../test/small_SUITE_data/src/ddfs_master/gs_util.hrl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/dialyzer/test/small_SUITE_data/src/ddfs_master/gs_util.hrl (limited to 'lib/dialyzer/test/small_SUITE_data/src/ddfs_master/gs_util.hrl') diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/gs_util.hrl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/gs_util.hrl new file mode 100644 index 0000000000..d579e9a7d7 --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/gs_util.hrl @@ -0,0 +1,16 @@ +% This is a set of type utilities to be used when spec-cing the +% callbacks of a gen_server implementation. It should be included in +% the impl module, which needs to define the state() type. + +-type gs_init() :: {ok, state()}. +-type gs_reply(T) :: {reply, (T), state()}. +-type gs_noreply() :: {noreply, state()}. +-type gs_noreply_t() :: {noreply, state(), non_neg_integer()}. +-type gs_stop(T) :: {stop, (T), state()}. + +% Generic utilities. + +-type server() :: pid() | atom() | {atom(), node()}. +-type from() :: {pid(), term()}. + +-type dbg_state_msg() :: dbg_get_state. -- cgit v1.2.3