Created
September 3, 2019 19:36
-
-
Save lasseebert/2f10128bf89fc32a25900e29f855240e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 DialyzerTest do | |
@spec a() :: :ok | :error | :another_error | |
def a do | |
[:ok, :error, :another_error] |> Enum.random() | |
end | |
@spec c() :: :ok | :error | |
def c do | |
with :ok <- a() do | |
:ok | |
else | |
:error -> :error | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment