diff options
author | Allen Madsen <allen.c.madsen@gmail.com> | 2018-06-13 03:37:33 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2018-06-13 09:37:33 +0200 |
commit | 16fe53bc10fd4360cd41139f79207bb93c167b60 (patch) | |
tree | d88b8036958d1fc2bcffc84391b1d89d33f6f7b8 | |
parent | a9a271e360064c3690b6a1b19fc484f516d7c4d3 (diff) | |
download | elixir-16fe53bc10fd4360cd41139f79207bb93c167b60.tar.gz |
Fix type spec for Task.Supervisor.start_child/4 (#7745)
-rw-r--r-- | lib/elixir/lib/task/supervisor.ex | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/elixir/lib/task/supervisor.ex b/lib/elixir/lib/task/supervisor.ex index 2899400a6..1206f2b28 100644 --- a/lib/elixir/lib/task/supervisor.ex +++ b/lib/elixir/lib/task/supervisor.ex @@ -317,7 +317,7 @@ defmodule Task.Supervisor do or an integer indicating the timeout value, defaults to 5000 milliseconds. """ - @spec start_child(Supervisor.supervisor(), (() -> any)) :: {:ok, pid} + @spec start_child(Supervisor.supervisor(), (() -> any)) :: DynamicSupervisor.on_start_child() def start_child(supervisor, fun, options \\ []) do restart = options[:restart] shutdown = options[:shutdown] @@ -331,7 +331,8 @@ defmodule Task.Supervisor do Similar to `start_child/2` except the task is specified by the given `module`, `fun` and `args`. """ - @spec start_child(Supervisor.supervisor(), module, atom, [term]) :: {:ok, pid} + @spec start_child(Supervisor.supervisor(), module, atom, [term]) :: + DynamicSupervisor.on_start_child() def start_child(supervisor, module, fun, args, options \\ []) when is_atom(fun) and is_list(args) do restart = options[:restart] |