Skip to content

Commit 9c1bd76

Browse files
committed
Remove expected intersection as now track underscores
1 parent 3cb0b51 commit 9c1bd76

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

lib/elixir/lib/module/types/pattern.ex

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -262,18 +262,13 @@ defmodule Module.Types.Pattern do
262262
@doc """
263263
Computes the domain from the pattern tree and expected types.
264264
265-
Note we use `upper_bound` because the user of dynamic in the signature
265+
Note we use `upper_bound` because the use of dynamic in the signature
266266
won't make a difference.
267267
"""
268-
def of_domain([{tree, expected, _pattern} | trees], stack, context) do
269-
[
270-
intersection(of_pattern_tree(tree, stack, context), expected) |> upper_bound()
271-
| of_domain(trees, stack, context)
272-
]
273-
end
274-
275-
def of_domain([], _stack, _context) do
276-
[]
268+
def of_domain(trees, stack, context) do
269+
Enum.map(trees, fn {tree, _, _} ->
270+
tree |> of_pattern_tree(stack, context) |> upper_bound()
271+
end)
277272
end
278273

279274
defp of_pattern_args_zip(

0 commit comments

Comments
 (0)