Skip to content

Commit

Permalink
Add regression test for gyson#23
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Bärenz committed Dec 25, 2020
1 parent 57262fe commit e6f637e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/ex_type/checker_test_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,21 @@ defmodule ExType.CheckerTestCase do
def test_case_3 do
23
end

# Regression test for https://github.com/gyson/ex_type/issues/23
defmodule Nested do
@enforce_keys [:nested]
defstruct @enforce_keys

@type t(nested) :: %Nested{
nested: nested
}
end

# FIXME Would be great to have your input how you want to name test cases :)
@spec get_nested(Nested.t(nested)) :: nested when nested: any()

def get_nested(%Nested{nested: nested}) do
nested
end
end

0 comments on commit e6f637e

Please sign in to comment.