Created
April 17, 2015 16:54
-
-
Save zambal/52ab241a8c84a80e9e13 to your computer and use it in GitHub Desktop.
False unused import warning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule ToImport do | |
def hello do | |
"Hello" | |
end | |
end | |
defmodule Test do | |
import ToImport | |
defmacrop precompile(expr) do | |
{ res, _ } = Code.eval_quoted(expr, [], __CALLER__) | |
quote do | |
unquote(res) | |
end | |
end | |
def test do | |
precompile hello() | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment