Hi! I have this kind of function:
@spec run(fun()) :: :ok
def run(task) do
task.()
run(task)
end
Dialyzer doesn’t complain about this. I can use almost anything as return type. For example, this works too:
@spec run(fun()) :: String
But this does not work:
@spec run(fun()) :: none()
Does the return type matter in this case? Why Dialyzer does not complain about it and why I cannot use none()
as return type?