Browse Source

Fix misc. dialyzer errors

Fix the following 11 issues:
src/gproc_pool.erl
 455: The variable Other can never match since previous clauses completely covered the type 'false'
 473: The call gproc_pool:try_claim(Workers::[any(),...], F::any()) will never return since it differs in the 1st argument from the success typing arguments: ([], any())
 483: Function claim_cont/2 will never be called
 498: Function try_claim/2 has no local return
 498: The pattern <[], _> can never match the type <[any(),...],_>
 508: Function try_claim/3 has no local return
 510: The pattern [0, 1] can never match the type integer()
 513: The pattern [1, 1] can never match the type integer()
 538: Function execute_claim/3 will never be called
 541: The created fun has no local return
 578: Function clear_wait/1 will never be called

Also, the %% @ spec shows the "true" spec
Paulo F. Oliveira 7 years ago
parent
commit
fe63b8f335
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/gproc.erl

+ 1 - 1
src/gproc.erl

@@ -1816,7 +1816,7 @@ lookup_values({T,_,_} = Key) ->
 %% appropriate value type.
 %% @end
 %%
--spec update_counter(key(), increment()) -> integer().
+-spec update_counter(key(), increment()) -> integer() | [integer()].
 update_counter(Key, Incr) ->
     Pid = case Key of
 	      {n,_,_} -> n;