Skip to content

Commit a2f8ed0

Browse files
author
Vadim Tsvetkov
committed
Use apply instead of direct call to supress warnings
Not defined warning caused by jmp instruction
1 parent c6b2177 commit a2f8ed0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/algae/internal.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ defmodule Algae.Internal do
253253
def default_value({{:., _, [{_, _, adt}, :t]}, _, []}) do
254254
quote do
255255
if Kernel.function_exported?(unquote(Module.concat(adt)), :new, 0) do
256-
unquote(Module.concat(adt)).new()
256+
apply(Module.concat(adt), :new, [])
257257
else
258258
nil
259259
end
@@ -263,7 +263,7 @@ defmodule Algae.Internal do
263263
def default_value({{:., _, [module, :t]}, _, []}) do
264264
quote do
265265
if Kernel.function_exported?(unquote(module), :new, 0) do
266-
unquote(module).new()
266+
apply(unquote(module), :new, [])
267267
else
268268
nil
269269
end

0 commit comments

Comments
 (0)