Skip to content

Commit

Permalink
DROP? Some test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Bärenz committed Feb 24, 2021
1 parent 4201165 commit 25f6804
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/example/foo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,16 @@ defmodule ExType.Example.Foo do
end
end

@spec receive_specific_example() :: integer()

def receive_specific_example() do
receive do
xs when is_list(xs) -> length(xs)
{_, _} -> 2
_ -> 0
end
end

@spec case_example(integer()) :: integer()

def case_example(x) do
Expand Down Expand Up @@ -231,4 +241,11 @@ defmodule ExType.Example.Foo do
def add_number(x, y) do
x + y
end

@spec function_with_send() :: :foo

def function_with_send() do
send(self(), "hi")
:foo
end
end
7 changes: 7 additions & 0 deletions test/ex_type/checker_test_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,11 @@ defmodule ExType.CheckerTestCase do
def get_nested(%Nested{nested: nested}) do
nested
end

@spec function_with_send() :: :foo

def function_with_send() do
send(self(), "hi")
:foo
end
end

0 comments on commit 25f6804

Please sign in to comment.