aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src/recursive_types3.erl
blob: 997678ac92bfbde65ec596b1bf80c4fb121fce4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-module(recursive_types3).

-export([test/1]).

-record(tree,   {node         :: atom(),
		 kid = nil    :: 'nil' | tree()}).

-type tree() :: #tree{}.

-spec test(tree()) -> tree().

test(Tree) ->
  case Tree of
    #tree{node = root, kid=#tree{}} -> Tree
  end.