diff options
author | Raimo Niskanen <raimo@erlang.org> | 2022-03-14 16:13:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-14 16:13:22 +0100 |
commit | f0883ac5bc96e38e4a69be33357051874fc114bc (patch) | |
tree | e4f21c0ebc1b1f6566ff80c073b8c25fb04d91c1 /lib/dialyzer | |
parent | d08faa2179acf0b1f6fd7c785763b615e0b22ed8 (diff) | |
parent | 9155b5a0239b7c1cb3046099a9bba68e3ef6935f (diff) | |
download | erlang-f0883ac5bc96e38e4a69be33357051874fc114bc.tar.gz |
Merge pull request #5751 from RaimoNiskanen/raimo/stdlib/gen_server-types/GH-2375_GH-2690/OTP-17915
gen_server types (OTP-17915)
Diffstat (limited to 'lib/dialyzer')
3 files changed, 7 insertions, 7 deletions
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(), |