Background
I am trying to use diallyzer in a project, however it is throwing errors that I don’t believe are accurate.
Code
@spec new(keyword) :: __MODULE__.t
def new(fields) do
raw = Keyword.fetch!(fields, :raw)
struct!(__MODULE__, Keyword.put(fields, :compiled, EEx.compile_string(raw)))
end
Error
:0:unknown_function
Function EEx.compile_string/1 does not exist.
Question
I don’t understand where this is coming from, since the function does exist.
How can I fix this?