What happens if you supervise a supervisor as a worker?

In this section of the docs, it mentions that you can specify a type in the child spec for either worker or supervisor. As the question in the title implies, what would be the consequences of picking the wrong one?

Looking at the Erlang code:

https://github.com/erlang/otp/blob/master/lib/stdlib/src/supervisor.erl

It appears that the process type is used to define the default “Shutdown Value” if none is given (see “Shutdown Values” in Supervisor — Elixir v1.20.2)

It also appears that the type is used when you call Supervior.count_children which tells you how many of which type of child a supervisor has.

The type is also returned by Supervisor.which_children

It also affects code upgrading.