From a5412706f4185fddbac29216a49affd1e9f11da0 Mon Sep 17 00:00:00 2001 From: Caleb Date: Wed, 5 Feb 2014 22:37:01 -0500 Subject: Fix alternative registry type annotations in supervisor The type annotations for alternative registries using the {via,Module,Name} syntax was not given for sup_name() and sup_ref() in the supervisor module. The type annotation was inconsistent with the documentation and causes Dialyzer to complain about valid supervisor:start_link and supervisor:start_child calls. --- lib/stdlib/src/supervisor.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/stdlib') diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl index 6d8e25b1de..c04439344a 100644 --- a/lib/stdlib/src/supervisor.erl +++ b/lib/stdlib/src/supervisor.erl @@ -45,10 +45,13 @@ -type restart() :: 'permanent' | 'transient' | 'temporary'. -type shutdown() :: 'brutal_kill' | timeout(). -type worker() :: 'worker' | 'supervisor'. --type sup_name() :: {'local', Name :: atom()} | {'global', Name :: atom()}. +-type sup_name() :: {'local', Name :: atom()} + | {'global', Name :: atom()} + | {'via', Module :: module(), Name :: any()}. -type sup_ref() :: (Name :: atom()) | {Name :: atom(), Node :: node()} | {'global', Name :: atom()} + | {'via', Module :: module(), Name :: any()} | pid(). -type child_spec() :: {Id :: child_id(), StartFunc :: mfargs(), -- cgit v1.2.3