From a2f8ed05c348c6c00961c6f676f1c26cb3ddb77c Mon Sep 17 00:00:00 2001 From: Vadim Tsvetkov Date: Sun, 19 Jun 2022 04:06:38 +0300 Subject: [PATCH] Use apply instead of direct call to supress warnings Not defined warning caused by jmp instruction --- lib/algae/internal.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/algae/internal.ex b/lib/algae/internal.ex index 431c3b8..dc06f5b 100644 --- a/lib/algae/internal.ex +++ b/lib/algae/internal.ex @@ -253,7 +253,7 @@ defmodule Algae.Internal do def default_value({{:., _, [{_, _, adt}, :t]}, _, []}) do quote do if Kernel.function_exported?(unquote(Module.concat(adt)), :new, 0) do - unquote(Module.concat(adt)).new() + apply(Module.concat(adt), :new, []) else nil end @@ -263,7 +263,7 @@ defmodule Algae.Internal do def default_value({{:., _, [module, :t]}, _, []}) do quote do if Kernel.function_exported?(unquote(module), :new, 0) do - unquote(module).new() + apply(unquote(module), :new, []) else nil end