From 2e33b650c3a974c81aee06e5e8fb68ed28d9d1cb Mon Sep 17 00:00:00 2001 From: Patrick Sinclair Date: Wed, 28 Aug 2024 08:11:19 +0100 Subject: [PATCH] Remove changes from v2 as it's obsolete --- lib/expression/v2/callbacks.ex | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lib/expression/v2/callbacks.ex b/lib/expression/v2/callbacks.ex index 1ab3b5d..d826231 100644 --- a/lib/expression/v2/callbacks.ex +++ b/lib/expression/v2/callbacks.ex @@ -97,25 +97,12 @@ defmodule Expression.V2.Callbacks do function_exported?(Standard, vargs_function_name, 2) -> {:vargs, Standard, vargs_function_name} - # Check if the wrong number of arguments was provided - wrong_arity_but_function_exists?(module, exact_function_name) -> - {:error, "wrong number of arguments to #{function_name}."} - - # Check if the wrong number of arguments was provided - wrong_arity_but_function_exists?(Standard, exact_function_name) -> - {:error, "wrong number of arguments to #{function_name}."} - # Otherwise fail true -> {:error, "#{function_name} is not implemented."} end end - defp wrong_arity_but_function_exists?(module, function_name) - when is_atom(module) and is_atom(function_name) do - Enum.any?(0..20, fn arity -> Kernel.function_exported?(module, function_name, arity) end) - end - defmacro __using__(_opts) do quote do def callback(module \\ __MODULE__, context, function_name, args)