Open
Description
lib/a.ex:6: The variable is expected to have type nonempty_list(A) but it has type list(integer())
4 cond do
5 [] == list -> 0
6 match?([_a], list) -> list |> hd()
7 true -> Enum.max(list)
8 end
I'm not sure where the issue comes from or if it's supposed to be covered, but neither match?
nor a normal function pattern matching on the list holding one item will make the type be refined to nonempty_list
.