aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/supervisor.erl
diff options
context:
space:
mode:
authorCaleb <[email protected]>2014-02-05 22:37:01 -0500
committerCaleb Helbling <[email protected]>2014-02-07 13:23:56 -0500
commita5412706f4185fddbac29216a49affd1e9f11da0 (patch)
treea7517636cb0aac91b1f0fa8e925d5d84626846ad /lib/stdlib/src/supervisor.erl
parent23790daf1a2d384b0fc11c655fa825151d9fa420 (diff)
downloadotp-a5412706f4185fddbac29216a49affd1e9f11da0.tar.gz
otp-a5412706f4185fddbac29216a49affd1e9f11da0.tar.bz2
otp-a5412706f4185fddbac29216a49affd1e9f11da0.zip
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.
Diffstat (limited to 'lib/stdlib/src/supervisor.erl')
-rw-r--r--lib/stdlib/src/supervisor.erl5
1 files changed, 4 insertions, 1 deletions
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(),