AB
@spec depth4() :: {1,{2,{3,4}}}
def depth4(), do: {1,{2,{3,5}}} # ловится
@spec depth5() :: {1,{2,{3,{4,5}}}}
def depth5(), do: {1,{2,{3,{4,6}}}} # не ловится
может быть, наш пример с kwlist отсюда же как-то растет?
lib/dyatest.ex:50: Type specification 'Elixir.Dyatest.Foo':depth5() -> {1,{2,{3,{4,5}}}} is a subtype of the success typing: 'Elixir.Dyatest.Foo':depth5() -> {1,{2,{3,{_,_}}}}