Skip to content

Commit

Permalink
Validate signature for forward compatibility (#14235)
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim authored Jan 28, 2025
1 parent 55c05d9 commit 4b09a83
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/elixir/lib/module/parallel_checker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,16 @@ defmodule Module.ParallelChecker do

defp cache_chunk(table, module, exports) do
Enum.each(exports, fn {{fun, arity}, info} ->
# TODO: Match on signature directly in Elixir v1.22+
sig =
case info do
%{sig: {:strong, _, _} = sig} -> sig
%{sig: {:infer, _} = sig} -> sig
_ -> :none
end

:ets.insert(
table,
{{module, {fun, arity}}, Map.get(info, :deprecated), Map.get(info, :sig, :none)}
{{module, {fun, arity}}, Map.get(info, :deprecated), sig}
)
end)

Expand Down

0 comments on commit 4b09a83

Please sign in to comment.