Skip to content

Commit

Permalink
raise better error on no match
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Nov 1, 2023
1 parent 9b140c7 commit cbde019
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/elixir_sense/core/binding.ex
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,10 @@ defmodule ElixirSense.Core.Binding do
# not a module
defp expand_call(_env, {:atom, _mod}, _fun, _arity, _include_private, _stack), do: :none

defp expand_call(_env, target, fun, arity, include_private, _stack) do
raise "No clause matched #{inspect(target)}, #{inspect(fun)}, #{inspect(arity)}, #{inspect(include_private)}"
end

defp call_arity_match?(fun_arity, fun_defaults, call_arity) do
fun_arity - fun_defaults <= call_arity and call_arity <= fun_arity
end
Expand Down

0 comments on commit cbde019

Please sign in to comment.