Skip to content

Commit 2b2a99d

Browse files
authored
Avoid wrapping function arguments in phi_starter (#15788)
The return type was unused by disjoint_non_empty_domains?/3. Pass arguments directly to avoid tuple allocation. Assisted-by: Antigravity:Gemini-3.7-Flash
1 parent e3d2cea commit 2b2a99d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/elixir/lib/module/types/descr.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ defmodule Module.Types.Descr do
17901790
# we can simplify the phi function check to a direct subtyping test.
17911791
# This avoids the expensive recursive phi computation by checking only that applying the
17921792
# input to the positive intersection yields a subtype of the return
1793-
case disjoint_non_empty_domains?({arguments, return}, positives, seen) do
1793+
case disjoint_non_empty_domains?(arguments, positives, seen) do
17941794
:disjoint_non_empty ->
17951795
apply_disjoint(arguments, positives) |> subtype?(return)
17961796

@@ -1851,7 +1851,7 @@ defmodule Module.Types.Descr do
18511851
end
18521852
end
18531853

1854-
defp disjoint_non_empty_domains?({arguments, _return}, positives, seen) do
1854+
defp disjoint_non_empty_domains?(arguments, positives, seen) do
18551855
b1 = all_disjoint_arguments?(positives)
18561856

18571857
b2 =

0 commit comments

Comments
 (0)