diff options
author | Caleb <caleb.helbling@gmail.com> | 2014-02-05 22:37:01 -0500 |
---|---|---|
committer | Caleb Helbling <caleb.helbling@gmail.com> | 2014-02-07 13:23:56 -0500 |
commit | a5412706f4185fddbac29216a49affd1e9f11da0 (patch) | |
tree | a7517636cb0aac91b1f0fa8e925d5d84626846ad /lib | |
parent | 23790daf1a2d384b0fc11c655fa825151d9fa420 (diff) | |
download | otp-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')
-rw-r--r-- | lib/stdlib/src/supervisor.erl | 5 |
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(), |