Skip to content

Commit e9879e6

Browse files
sabiwarajosevalim
andauthored
Raise when functions are not found
Co-authored-by: José Valim <[email protected]>
1 parent 6ff5011 commit e9879e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/elixir/lib/protocol.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ defmodule Protocol do
684684
Enum.find_value(clauses, fn
685685
{_meta, [:functions], [], clauses} -> clauses
686686
_ -> nil
687-
end)
687+
end) || raise "could not find protocol functions"
688688
end
689689

690690
defp change_protocol({_name, _kind, meta, clauses}, types) do

0 commit comments

Comments
 (0)