Skip to content

Commit

Permalink
mix format
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jan 3, 2025
1 parent 1a4907a commit 4ebd0e4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/elixir/lib/module/types/pattern.ex
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,10 @@ defmodule Module.Types.Pattern do
{tree, context} = of_pattern(pattern, [{:arg, 0, expr}], stack, context)
{pattern_info, context} = pop_pattern_info(context)
{expected, context} = expected_fun.(of_pattern_tree(tree, context), context)
tag = {:match, expected}

{[type], context} =
of_single_pattern_recur(expected, {:match, expected}, tree, pattern_info, expr, stack, context)
of_single_pattern_recur(expected, tag, tree, pattern_info, expr, stack, context)

{type, context}
end
Expand All @@ -144,7 +145,10 @@ defmodule Module.Types.Pattern do
context = init_pattern_info(context)
{tree, context} = of_pattern(pattern, [{:arg, 0, expr}], stack, context)
{pattern_info, context} = pop_pattern_info(context)
{_, context} = of_single_pattern_recur(expected, tag, tree, pattern_info, expr, stack, context)

{_, context} =
of_single_pattern_recur(expected, tag, tree, pattern_info, expr, stack, context)

{_, context} = Enum.map_reduce(guards, context, &of_guard(&1, @guard, &1, stack, &2))
context
end
Expand Down

0 comments on commit 4ebd0e4

Please sign in to comment.