Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/elixir/lib/module/types/descr.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1871,10 +1871,12 @@ defmodule Module.Types.Descr do
end

# For two arguments to be disjoint, one of their types must be disjoint.
defp disjoint_arguments?(args1, args2) do
Enum.any?(Enum.zip(args1, args2), fn {t1, t2} -> disjoint?(t1, t2) end)
defp disjoint_arguments?([type1 | args1], [type2 | args2]) do
disjoint?(type1, type2) or disjoint_arguments?(args1, args2)
end

defp disjoint_arguments?([], []), do: false

defp all_disjoint_arguments?([]), do: true

defp all_disjoint_arguments?([bdd_leaf(args, _) | rest]) do
Expand Down
Loading