Skip to content

Commit

Permalink
Use apply instead of direct call to supress warnings
Browse files Browse the repository at this point in the history
Not defined warning caused by jmp instruction
  • Loading branch information
Vadim Tsvetkov committed Jun 19, 2022
1 parent c6b2177 commit a2f8ed0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/algae/internal.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit a2f8ed0

Please sign in to comment.