Skip to content

Commit 16fe53b

Browse files
blatyojosevalim
authored andcommitted
Fix type spec for Task.Supervisor.start_child/4 (#7745)
1 parent a9a271e commit 16fe53b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/elixir/lib/task/supervisor.ex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ defmodule Task.Supervisor do
317317
or an integer indicating the timeout value, defaults to 5000 milliseconds.
318318
319319
"""
320-
@spec start_child(Supervisor.supervisor(), (() -> any)) :: {:ok, pid}
320+
@spec start_child(Supervisor.supervisor(), (() -> any)) :: DynamicSupervisor.on_start_child()
321321
def start_child(supervisor, fun, options \\ []) do
322322
restart = options[:restart]
323323
shutdown = options[:shutdown]
@@ -331,7 +331,8 @@ defmodule Task.Supervisor do
331331
Similar to `start_child/2` except the task is specified
332332
by the given `module`, `fun` and `args`.
333333
"""
334-
@spec start_child(Supervisor.supervisor(), module, atom, [term]) :: {:ok, pid}
334+
@spec start_child(Supervisor.supervisor(), module, atom, [term]) ::
335+
DynamicSupervisor.on_start_child()
335336
def start_child(supervisor, module, fun, args, options \\ [])
336337
when is_atom(fun) and is_list(args) do
337338
restart = options[:restart]

0 commit comments

Comments
 (0)