From 76bed16d9071bfc3e6ea53f74196f1eb599ed248 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Mon, 28 Feb 2022 13:47:23 +0100 Subject: Update dialyzer test cases --- .../test/behaviour_SUITE_data/results/gen_server_incorrect_args | 2 +- lib/dialyzer/test/small_SUITE_data/results/gencall | 8 +++++--- lib/dialyzer/test/small_SUITE_data/src/gencall.erl | 4 +--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/dialyzer/test/behaviour_SUITE_data/results/gen_server_incorrect_args b/lib/dialyzer/test/behaviour_SUITE_data/results/gen_server_incorrect_args index 69c2186481..a1412f29e6 100644 --- a/lib/dialyzer/test/behaviour_SUITE_data/results/gen_server_incorrect_args +++ b/lib/dialyzer/test/behaviour_SUITE_data/results/gen_server_incorrect_args @@ -2,4 +2,4 @@ gen_server_incorrect_args.erl:3:2: Undefined callback function handle_cast/2 (behaviour gen_server) gen_server_incorrect_args.erl:3:2: Undefined callback function init/1 (behaviour gen_server) gen_server_incorrect_args.erl:7:1: The inferred return type of handle_call/3 ({'no'} | {'ok'}) has nothing in common with {'noreply',_} | {'noreply',_,'hibernate' | 'infinity' | non_neg_integer() | {'continue',_}} | {'reply',_,_} | {'stop',_,_} | {'reply',_,_,'hibernate' | 'infinity' | non_neg_integer() | {'continue',_}} | {'stop',_,_,_}, which is the expected return type for the callback of the gen_server behaviour -gen_server_incorrect_args.erl:7:1: The inferred type for the 2nd argument of handle_call/3 ('boo' | 'foo') is not a supertype of {pid(),_}, which is expected type for this argument in the callback of the gen_server behaviour +gen_server_incorrect_args.erl:7:1: The inferred type for the 2nd argument of handle_call/3 ('boo' | 'foo') is not a supertype of {pid(),gen_server:reply_tag()}, which is expected type for this argument in the callback of the gen_server behaviour diff --git a/lib/dialyzer/test/small_SUITE_data/results/gencall b/lib/dialyzer/test/small_SUITE_data/results/gencall index b4dec09e4b..4e32e2aa9c 100644 --- a/lib/dialyzer/test/small_SUITE_data/results/gencall +++ b/lib/dialyzer/test/small_SUITE_data/results/gencall @@ -1,4 +1,6 @@ -gencall.erl:11:3: Call to missing or unexported function gencall:foo/0 -gencall.erl:12:3: Call to missing or unexported function gen_server:handle_cast/2 -gencall.erl:9:3: Call to missing or unexported function ets:lookup/3 +gencall.erl:10:3: Call to missing or unexported function gen_server:handle_cast/2 +gencall.erl:5:1: Function f/0 has no local return +gencall.erl:6:34: The call gen_server:call(pid(),'request',{'not_a_timeout'}) breaks the contract (ServerRef::server_ref(),Request::term(),Timeout::timeout()) -> Reply::term() +gencall.erl:7:3: Call to missing or unexported function ets:lookup/3 +gencall.erl:9:3: Call to missing or unexported function gencall:foo/0 diff --git a/lib/dialyzer/test/small_SUITE_data/src/gencall.erl b/lib/dialyzer/test/small_SUITE_data/src/gencall.erl index 762be55007..8e0ac802fb 100644 --- a/lib/dialyzer/test/small_SUITE_data/src/gencall.erl +++ b/lib/dialyzer/test/small_SUITE_data/src/gencall.erl @@ -1,11 +1,9 @@ -%% Error: gen_server:handle_cast/2 is not logged as an unexported func -%% but unknown function. -module(gencall). -export([f/0]). f() -> - gen_server:call(1,2,3), + gen_server:call(self(),request,{not_a_timeout}), ets:lookup(1,2,3), some_mod:some_function(), gencall:foo(), -- cgit v1.2.1